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: 

For more information on how to automatically generate SharinPix tokens for image upload, refer to the following article:

SharinPix automatic token generation (Admin Friendly)

Access the SharinPix Token from the parent object

In the present context, the Work Order 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 SharinPix Album object towards the Parent Object needs to be created.

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

Creating the Process Builder

  • Go to Setup. In the Quick Find Box, type “Process Builder”.
  • Under the section Process Automation, select Process Builder.
  • Click on the button New.
  •  Fill the fields as shown below:
  1. In the Process Name, enter the name for your process. (In this context, it is Update SharinPix Token Fields on Work Order).
  2. The API Name will then generate the API name of the process name.
  3. Enter a description for the process. (optional)
  4. In the The process starts when field, select A record changes.  
  5. Then click Save.

The Process Builder will then open.

  • Click on Add Object.
  • On the right-hand-side, under Object, select an object related to the current one, in this context it is Work Order.
  • Start the Process: Only when a record is created.
  • Click Save.

Select Add Criteria.

When the right-hand-side appears:

  • In the field Criteria Name, enter the name for the Criteria.
  • Under Criteria Executing Actions, select No criteria-just execute the actions!

Click on Add Action.

When the right-hand-side appears:

  • In Action Type field, select Update Records.
  • Give a name to the action inside the Action Name field. In this case, it is Update SharinPix Token Fields.
  •  Inside the Record Type field:
    1. For Select a Record to Update, choose Select a record related to the sharinpix__SharinPixAlbum__c.
    2. Inside Type to filter list, choose Work Order.
  •  For Criteria for Updating Records, choose No criteria—just update the records! 
  • Inside Set new field values for the records you update :
    1. Select SharinPix Token Part 1 with Type Field Reference and Value which references the field SharinPix Token Part 1 of the related Object with is SharinPix Album in our context. (In this case it is sharinpix__SharinPixAlbum__c .sharinpix__SharinPix_Token_Part_1__c).
    2. Select SharinPix Token Part 2 with Type Field Reference and Value which references the field SharinPix Token Part 2 of the related Object with is SharinPix Album in our context. (In this case it is sharinpix__SharinPixAlbum__c .sharinpix__SharinPix_Token_Part_2__c).
    3. Select SharinPix Token Part 3 with Type Field Reference and Value which references the field SharinPix Token Part 3 of the related Object with is SharinPix Album in our context. (In this case it is sharinpix__SharinPixAlbum__c .sharinpix__SharinPix_Token_Part_3__c).
  • Click Save.

Save. Then, in the upper right corner, Activate. 

You can now access access the SharinPix Token on the Work Order object.

0 Comments

Add your comment

E-Mail me when someone replies to this comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.