Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Buttons in Lists

          Buttons in Lists

          Consumer Goods Cloud Mobile App Framework supports display of buttons in lists. This feature enables Consumer Goods Cloud offline mobile app users to perform quick actions like image capturing from a mobile device and attaching it to the current list item task.

          Required Editions

          Available in Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled.

          To use buttons in lists, use a binding element of the type Button in the following UI controls:

          • GroupedList
          • EmbeddedList
          • BreadCrumbControl
          • MultiSelectionGroupedList
          • MultiSelectionBreadCrumbControl

          Sample Code

          <GroupedList name="myList" searchable="true" dataSource="ProcessContext::OverviewList.Items[]">
            <Items name="Items" itemPattern="myItemPattern">
              <ItemListLayout>
                <Default>
                  <Col width="10em">
                    <Row layoutType="ItemSecondary" bindingId="Button1" />
                  </Col>
                </Default>
              </ItemListLayout>
              <Bindings>   
                <Binding target="Button1" type="Button" binding=".displayedImageId" bindingMode="ONE_WAY" imageType=".svg"/>
              </Bindings>
            </Items>
            <Events>
              <ListButtonPressedEvent event="buttonPressed">
                <Params>
                  <Param name="pKey" value=".pKey" />
                </Params>
              </ListButtonPressedEvent>
            </Events>

          Using the binding element of the typeButton displays the button of the same bindingId in all the list items.

          Customization of Buttons in Lists

          You can customize the buttons in lists using the binding type, Dynamic. You can set the typeField value of Dynamic binding as data source attribute that specifies the actual type at run time. You can show or hide buttons in the lists through customization.

          Sample Code (Customization)

          <GroupedList name="myList" searchable="true" dataSource="ProcessContext::OverviewList.Items[]">
            <Items name="Items" itemPattern="myItemPattern">
              <ItemListLayout>
                <Default>
                  <Col width="10em">
                    <Row layoutType="ItemSecondary" bindingId="Button1" />
                  </Col>
                </Default>
              </ItemListLayout>
              <Bindings>
                <Binding target="Button1" type="Dynamic" typeField="variantType" binding=".buttonImageIcon" bindingMode="ONE_WAY" imageType=".svg"/>
              </Bindings>
            </Items>
            <Events>
              <ListButtonPressedEvent event="buttonPressed">
                <Params>
                  <Param name="pKey" value=".pKey" />
                </Params>
              </ListButtonPressedEvent>
              </Events>
          </GroupedList>
          Note
          Note
          • Consumer Goods Cloud Mobile App Framework implicitly adds the bindingId of the short pressed button as a parameter to the ListButtonPressedEvent event.
          • You can enable or disable buttons using the Edit and Access rights through Access Control List.
          • You can show or hide buttons in the lists through customization.
          • You can’t use two buttons of the same bindingId in the same list.
          • You can use more than one button in a list with a different bindingId.
          • You can also change the image displayed in the button dynamically using the binding value.
          • If a resource binding is used for an image of Button binding type then no Edit and Access rights support is available.
          • Support for Long Press of Buttons
            Consumer Goods Cloud Mobile App Framework displays a context menu when a user presses a button in a list for more than 0.5 seconds.
          • Number Badge for Buttons in Lists
            Consumer Goods (CG) Cloud Mobile App Framework supports the display of number badge for buttons in lists. This feature enables CG Cloud Offline Mobile App users to track facts such as number of images captured and attached to the current list item task. This is possible by using an additional attribute, badgeText, in the binding element of the Button type and the Dynamic type in UI controls.
           
          Loading
          Salesforce Help | Article