Please help.
I created an object called UsrAppMobNotifications, which includes a Boolean variable UsrBoolRead. In the mobile application version 8.1, I need to set up a business rule so that when a user opens a record of this object, the UsrBoolRead variable becomes true.
The code of the mobile app's record page (UsrMobileUsrAppMobNotificationsRecordPageSettingsPortal) doesn't contain any blocks (like handlers).
Question 1: How can I add my own business rule?
Question 2: I tried to create a rule based on examples, but it doesn't work.
My rule^
Terrasoft.sdk.Model.addBusinessRule("UsrAppMobNotifications", {
name: "SetUsrBoolReadTrueRule",
ruleType: Terrasoft.RuleTypes.Custom,
events: [Terrasoft.BusinessRuleEvents.Load],
executeFn: function(model, rule, column, customData, callbackConfig) {
model.set("UsrBoolRead", true);
Ext.callback(callbackConfig.success, callbackConfig.scope);
}
});