Question

Hiding Orders in Account Mobile app based on condition

Hi,

I am given with the requirement to hide Orders section in account Mobile app, if the Account is inactive.

I have added a field in Account Called usrAccountInactive . The order section should be visible only if this field is false. 

I tried with the below module. But dependentColumnNames : here i will have to give only columnname. But not object name. Please help to reslove this.

Terrasoft.sdk.Model.addBusinessRule("Account",{

    ruleType: Terrasoft.RuleTypes.Visibility, 

    events:[Terrasoft.BusinessRuleEvents.Load],

    conditionalColumns: [ 

        {name: "UsrAccountInactive" , value: false } 

    ], 

    triggeredByColumns: [ "UsrAccountInactive" ] , 

    dependentColumnNames: [ "Order" ]  

});

 

 

Thanks in Advance

Like 0

Like

5 comments

Please specify what is "account Mobile app". Additionally, it would be helpful if you create a video that describes the request. 

Eugene Podkovka,

 

sorry for the confusion. i.e Account screen in BPM Mobile app. 

Please find the below link that explains my requirement. Please help to do this.

https://drive.google.com/file/d/1MNzspAx3_5dOn5SlIfE7hAxFDZOl_Wfj/view

 

Thanks in advance

Please find an example for the functionality below.

//create a new module UsrMobileAccountPreviewPage with the code
/* globals Account: false */
Terrasoft.LastLoadedPageData = {
    controllerName: "UsrAccountPreviewPage.Controller",
    viewXType: "usractivitypreviewpageview"
};
Ext.define("UsrAccountPreviewPage.View", {
    extend: "AccountPreviewPage.View",
    xtype: "usractivitypreviewpageview",
    config: {
        id: "AccountPreviewPage"
    },
    /**
     * @inheritdoc
     * @protected
     * @overridden
     */
    shouldHidePanelItem: function(loadedRecord, component) {
        var detailName = component.config.name;
        if (detailName === "ActivityDetailV2StandartDetail") {
            var categoryId = loadedRecord.get("AccountCategory.Id");
            return categoryId !== Terrasoft.Configuration.AccountCategory.DoctorVisit;
        } else {
            return this.callParent(arguments);
        }
    }
});
Ext.define("UsrAccountPreviewPage.Controller", {
    extend: "AccountPreviewPage.Controller",
    statics: {
        Model: Account
    },
    config: {
        refs: {
            view: "#AccountPreviewPage"
        }
    }
});
 
//register the module in the manifest
"Models": {
    "Account": {
        ...
        "Preview": "UsrMobileAccountPreviewPage",
        ...

 

Eugene Podkovka,

Hi , the steps is not clear. Please tell what does the above code do. I implemented the same.. I dint find any difference in Account's activity section.

Please help..

 

Show all comments