You are here:
Add a Button to Launch Google Maps
Create a button on the Display Detail screen in the Consumer Goods offline mobile app to open Google Maps.
Required Editions
| Available in: Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled |
| User Permissions Needed | |
|---|---|
| To add a button to launch Google Maps: | CG Cloud Developer, Admin |
Sales reps open Google Maps from a customer’s display record on the Consumer Goods offline mobile app to see the navigation route to the customer’s location. This helps them find the quickest route to customer stores.
-
To combine the maps app launch button and the customer lookup, create a merger control
in your Modeler workspace. Add the customer lookup merger control to the
MyDisplay_DisplayDetailsUI.userinterface.xml contract.
<Merger name="CustomerMerger" pattern="oneInputControlTwoButtonsMax" leftRatio="80" rightRatio="20" > <Lookup name="Customer"> <Bindings> <Resource target="Label" type="Label" id="CustomerId" defaultLabel="Customer" /> <Binding target="Value" binding="ProcessContext::CurrentDisplay.luCustomer.name" bindingMode="TWO_WAY" /> </Bindings> <Events> <LookupEvent event="CustomerLookup" /> </Events> </Lookup> </Merger> -
Create an image button control. In Merger, add the image button as a second control.
<ImageButton name="NavigateTo"> <Bindings> <Resource target="Image" type="Image" id="Navigate" defaultImage="Navigate" /> <Binding type="Visible" target="Visible" call="ProcessContext::CurrentDisplay.myHasLuCustomer"/> </Bindings> <Events> <ButtonPressedEvent event="NavigateTo" /> </Events> </ImageButton> - Save your changes.
-
Build your contracts to check for validation errors. Run
sf mdl build.
Did this article solve your issue?
Let us know so we can improve!

