Hi Team,
I am currently working on creatio mobile app and trying to get the list of roles that are being tagged to the current user in addBusinessRule.But I am not able to get it using Terrasoft.store.BaseStore.
I tried using Try catch block , the error message is empty. Can you please help me regarding this?
Terrasoft.sdk.Model.addBusinessRule("Activity", { name: "FieldForceActivityTypeRule", ruleType: Terrasoft.RuleTypes.Custom, triggeredByColumns: ["Type"], events: [Terrasoft.BusinessRuleEvents.Load], executeFn: function(record, rule, column, customData, callbackConfig, event) { var currentUser = Terrasoft.CurrentUserInfo.userId; alert("currentUser: "+ currentUser); var modelName = "SysUserInRole"; var store = Ext.create("Terrasoft.store.BaseStore", { model: modelName }); var columns = ["SysRole", "SysUser"]; var queryConfig = Ext.create("Terrasoft.QueryConfig", { modelName: modelName, columns: columns }); var filtersConfig = { property: "SysUser", value: currentUser }; store.setPageSize(Terrasoft.AllRecords); store.loadPage(1, { isCancelable: true, filters: Ext.create("Terrasoft.Filter", filtersConfig), queryConfig: queryConfig, callback: function(loadedRecords, operation, success) { if (success) { alert("success :"+ loadedRecords.length); for (var i = 0, ln = loadedRecords.length; i < ln; i++) { var record = loadedRecords[i]; alert("i "+ record); } } }, scope: this }); Ext.callback(callbackConfig.success, callbackConfig.scope, [true]); } });
Like
1 comments
Show all comments