In the Consumer Goods Cloud offline mobile app, create a business logic method to
display the button that launches the third-party app. This method ensures that sales reps can view
the button on the UI when they log in to the app.
Required Editions
| Available in: Professional, Enterprise, and Unlimited Editions
that have Consumer Goods Cloud enabled |
| User Permissions Needed |
| To configure button visibility settings: |
CG Cloud Developer, Admin |
-
To determine button visibility, add a business logic method to the MyDisplay module. In VS
Code terminal, run
sf mdl add and enter these
details.
? Select the resource you want to add: businesslogic
? Specify a name for the business logic: HasLuCustomer
? Select the module to which the HasLuCustomer business logic is added: MyDisplay
? Select a suitable option for the HasLuCustomer business logic: method
? Select the reference object to add the business logic method: BoMyDisplays
-
Add the snippet to the jsDoc tags in the new business logic method.
* @returns visible
-
In the customization range, enter the code.
var visible = me.getLuCustomer().getPKey() !=' ' ? true : false;
-
Save your changes.
-
To check for validation errors, build your contracts. Run
sf
mdl build.