Using SharinPix in Salesforce Community
Prerequisites:
Salesforce Communities should be enabled on your organisation.
Enable the usage of SharinPix in Salesforce Community
To enable the usage of SharinPix in Salesforce Community, a CSP Trusted Site entry has to be added for SharinPix. To do so, follow the steps below:
1. Go to Setup. Enter CSP in the Quick Find Box.
2. Under Security, select CSP Trusted Sites.
3. Then, click on New Trusted Site as shown below:
You will be directed to the page below:
4. For the field Trusted Site Name, enter SharinPix
5. For the field Trusted Site URL, enter https://app.sharinpix.com
6. Then, click on Save
7. Next, repeat steps 3 to 6 to create new trusted sites using the following SharinPix endpoint URL as the Trusted Site URL: https://p.sharinpix.com
Add the SharinPix Album component to a Community home page
To add a SharinPix Album component to a Community Home Page, follow the steps below:
- Go to Setup, then enter Communities in the Quick Find Box
- Under Communities, select All Communities
- Click on Builder next to the Community you intend to modify
- Once inside the Builder, select the Components menu from the home page. Then, scroll down to the Custom Components section
- Drag and Drop the SharinPix Album component onto the desired region
- To display images on the SharinPix Album, you will need to supply a record Id in the AlbumId field available in the component's property editor. The SharinPix Album will then display all the images corresponding to that record
Make sure to publish the community in order to make the changes visible to your given audience.
Add the SharinPix Album to a Community record page
There are two ways of adding a SharinPix album to a Community record page:
- By either adding the SharinPix Album lightning component to the record page
- Or by adding a Visualforce page embedding a SharinPix album component to the record page
Note:
If you intend to use a Salesforce object on a Community, you should ensure that proper access rights has been given to the object so as to view the records.
Add the SharinPix Album component to a Community record page
To add the SharinPix Album to the Community record page:
- Edit the record page in Builder mode
- From Components, find the SharinPix Album component under the Custom Components
- Drag and drop the SharinPix Album component onto the desired region on the record page
The result should be as follows:
Add a Visualforce page embedding a SharinPix album to the record page
It is possible to add a Visualforce page containing a SharinPix album on a Community record page. To do so:
- Implement a Visualforce page embedding the SharinPix album. You can use the code snippet below for this implementation:
<apex:page standardController="Account">
<sharinpix:SharinPix height="500px"
parameters="{
'Id': '{!CASESAFEID($CurrentPage.parameters.Id)}',
'abilities':{
'{!CASESAFEID($CurrentPage.parameters.Id)}':{
'Access': {
'image_upload':true,
'image_list':true,
'see':true,
'image_delete':true
}
}
}
}"
/>
</apex:page>
- Once your Visualforce page is ready, go ahead and edit the desired record page in Builder mode
- From Components, drag and drop the Visualforce Page found under the Content section onto the desired region on the record page
- In the component's property editor, make sure that the field Record ID has {!recordId} as value
The result should be as follows:
Information:
If a Visualforce page embedding a SharinPix album is already present on an object's page layout, the Visualforce page will also be visible in the Details section of the corresponding records inside a Salesforce Community.
The screenshot below depicts an Account record's Details section with a Visualforce page embedding the SharinPix Album component:
Tip:
Community users do not have all access rights to SharinPix by default.
If you encounter issues regarding Community users not having proper access to the SharinPix Image Sync or SharinPix components, please refer to the following article:
0 Comments
Add your comment