SharinPix DocumentationMain Documentation SharinPix - Access and SecurityHow to pull the SharinPix Token onto my object ? (Developer-oriented)

How to pull the SharinPix Token onto my object ? (Developer-oriented)

Tip: To find out how to automatically generate a SharinPix Token, access the following article: SharinPix automatic token generation (Admin Friendly)

Access the SharinPix Token from the parent object

In the present context, the Account object is referred as the Parent Object.

  • Create a lookup relationship

In order to pull out a field value from the SharinPix Album object onto a parent object(Account), a Lookup Relationship from the Parent Object towards the SharinPix Album object needs to be created.

  • Create a process builder that updates the related Parent object when a SharinPix album is created.

In order to fill in the Lookup relationship (Account to SharinPix Album), the following action needs to be configured inside the process builder.

In the above screenshot, the SharinPix Album Lookup (1) relationship is filled in with a reference to the related SharinPix Album record (2).

Generate a SharinPix Mobile App URL

  • With the use of the lookup relationship created above, the SharinPix Token can be retrieved from the related SharinPix Album and displayed on the Account Object.
  • The SharinPix Mobile App URL can thus be generated by:
    1. Referencing the SharinPix Token field from the related SharinPix Album.
    2. Formatting the SharinPix Token so as to generate a SharinPix Mobile App URL.

This can be done through the use of a formula field as shown below:

  • The following syntax is used to reference the SharinPix Token field: SharinPix_Album__r.sharinpix__SharinPix_Token__c
  • Generating a SharinPix Mobile App URL in the proper format:

sharinpix://upload?token=' & SharinPix_Album__r.sharinpix__SharinPix_Token__c

  • Displaying a clickable link on the page-layout of the Parent Object:

HYPERLINK('sharinpix://upload?token=' & SharinPix_Album__r.sharinpix__SharinPix_Token__c, 'Open Camera')

0 Comments

Add your comment

E-Mail me when someone replies to this comment