---
schema_version: "1"
id: dd5ee515500246b99061541565815d93bce587ceb15191ac8bfea91c51f38c18
title: Configure Button Visibility Settings
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/configure_button_visibility_settings.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.configure_button_visibility_settings.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 602e362ef5694d103a65e9f65b3d7e5b7c834b8827b81f71d52d861e496fc19a
description: 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.
products:
  - Consumer Goods
release: "264"
---
# Configure Button Visibility Settings

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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d12554e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d12554e63 ">To configure button visibility settings:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d12554e63 ">CG Cloud Developer, Admin</td>

          </tr>
        </tbody>
      </table>

1. 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
    ```
2. Add the snippet to the jsDoc tags in the new business logic method. `* @returns visible`
3. In the customization range, enter the code.
    
    ```
    var visible = me.getLuCustomer().getPKey() !=' ' ? true : false;
    ```
4. Save your changes.
5. To check for validation errors, build your contracts. Run `sf mdl build`.