Integration of Salesforce mobile App with the SharinPix mobile App

Launching SharinPix Offline Mobile App from Salesforce Mobile App

The present section will enumerate the steps required in order for the SharinPix application to be launched from the Salesforce Mobile App.

The objective of the following demo is to launch the SharinPix Mobile App through the use of a **Custom Action **from a Case record. ** **

Implementation of the Visualforce Page

The **Action Type **of the **Custom Action **will be Custom Visualforce , within which a link will be used to launch the SharinPix Mobile App.

The code snippet implementing the Visualforce Page is shown below.

As seen above, the link contains the following content:

The merge-field {! Case.SharinPix_Token__c} references the SharinPix Token field containing the token value present on the current Case object.

Note: If you want this Visualforce Page to work on a specific Object, you just have to replace Case with the API Name of your Object.

Save the Visualforce Page as SharinPixOpenMobileAppFromCase.

Add action

  • Go to Setup , then Object Manager and access the Case Object.

  • Select the Buttons, Links, and Actions section.

  • Click on New Action.

  • In the picklist Action Type, select Custom Visualforce.

  • In the picklist Visualforce Page, select the Visualforce Page created above.

  • In the field Height, enter 500px.

  • In the field Label, enter Take Pictures.

  • In the field Icon, select ActionSharinPixAlbum icon (which comes with the installed SharinPix Package).

Add action to page-layout of Case

  • Go to the Case Page Layouts section.

  • Select the layout relevant to your context.

  • From Mobile & Lightning Actions, drag and drop Open SharinPix inside the Salesforce mobile and Lightning Experience Actions section.

  • Click on Save when done.

Access a Case record on the Salesforce Mobile App. The custom action Take Pictures can be found on the Action Bar as shown in the image below.

  • Tap on Take Pictures. The Visualforce Page SharinPixOpenMobileAppFromCase , as implemented previously,is displayed.

Each link corresponds to a SharinPix URL that will launch a particular camera mode:

  • Launch Camera only

  • Launch Image Roll only

  • Launch Camera and enable confirmation prompt.

  • If you tap on the Take Pictures with Camera link, the SharinPix Mobile App will launch and the camera view will open by default.

Now, you will be able to take pictures and upload them to the SharinPix Album of the Case object from which the SharinPix App was launched.

Last updated