For catalogs change it's content rapidly we use a dynamic list type, so that no scheme updates are required.
Storing catalogs requires some client folder customization.
Catalogs are stored as .txt files in "lists" folder, that is create in server under "client" folder. For default installation the path is "C:\Program Files (x86)\OPTIMAL SYSTEMS\enaio\service-manager\data\webresource\public\client".
Then in form script we call ajax to update dynamic list content of the field, example of code:
I can't find a working solution on how to nicely post the code sample.
The post formats itself automatically ignoring where I put code blocks.
/** start of code block ****/
$.ajax('/client/lists/accountingmethod.txt')
.done(function(data){
var entries = $.makeArray($.map(data.split('\r\n'),function(v){
var a = v.split('|'); //delimiter of description and value in .txt file
value = {value: a[0]};
if (a[1]) {
value.description = a[1];
}
return value;
}));
scope.model.strdynaccountno.setList({
config: { allelementsselectable: true },
entries: entries
});
});
/** end of code block ****/