Question

Customization capabilities in the Mobile plataform

Hello Community!

I have some doubts about the mobile customization capabilities and I would be very greatful I anyone could help me on this.

1. Is it possible to create business rules in the mobile version? Example: If the mobile user changes the "opportunity probability" field to "80", show or hide a specific field.

2. Is it possible to use CSS styles in the mobile?

3. If the user entered a different value than expected in any field in the mobile, is it possible to display a warning screen like "Dear user, this value is not permitted".

Thanks in advance.

Eric Campos
Brazil - São Paulo

Like

2 comments

 

Dear Eric,

Please find answers below:

1. Is it possible to create business rules in the mobile version? Example: If the mobile user changes the "opportunity probability" field to "80", show or hide a specific field.

In order to show or hide columns according to a certain condition (basically,

depending on the value in a certain column), you can use the business rule Terrasoft.RuleTypes.Visibility. To do this, specify the appropriate. type (property ruleType), events that will trigger this business rule (the events property), specify the column (or columns) on which the business rule (the triggeredByColumns property) depends, describe the condition of the business rule triggering (conditionalColumns property) and Specify the columns that you want to display when the above condition is met.

Terrasoft.sdk.Model.addBusinessRule('Account', {
    ruleType: Terrasoft.RuleTypes.Visibility,
    conditionalColumns: [
        {name: 'Type', value: Terrasoft.Configuration.Consts.AccountTypePharmacy}
    ],
    triggeredByColumns: ['Type'],
    dependentColumnNames: ['IsRx', 'IsOTC']
});

The condition in the example is possible only if there is a previously defined constant Terrasoft.Configuration.Consts.AccountTypePharmacy. That is, you can use both this constant and just the value property to specify a GUID value, but it's more correct to use such constants.

Terrasoft.Configuration.Consts = {
    AccountTypePharmacy: 'd12dc11d-8c74-46b7-9198-5a4385428f9a'
};

2. Is it possible to use CSS styles in the mobile?

To do this, you need to use the Terrasoft.writeStyles method. You can find an example in the MobileActivityGridPageV2 schema.

3. If the user entered a different value than expected in any field in the mobile, is it possible to display a warning screen like "Dear user, this value is not permitted".

You can create a validation in the following way:

Terrasoft.sdk.Model.addBusinessRule('Contact', {
    ruleType: Terrasoft.RuleTypes.RegExp,
    regExp : /^([0-9\(\)\/\+ \-]*)$/
    triggeredByColumns: ['HomeNumber', 'BusinessNumber']
});

TriggeredByColumns indicate what columns to apply rule to. You can add a warning message and display it when validation does not pass.

Regards,

Anastasia

Hi Anastasia,

Thank you so much for the detailed information! Really appreciated!

Regards,

Eric

Log in or register to comment