Enable Image Sync for Classic
In order to enable SharinPix Image Sync in the Salesforce Classic Experience, you need to add a line in your visual force page.
<sharinpix:ImageSync recordId="{! $CurrentPage.Parameters.Id }"/>
The resulting visual force page will be then be composed at least by :
The SharinPix Image Sync Component
The syntax of the SharinPix Image Sync is as follows:
<sharinpix:ImageSync recordId="{! $CurrentPage.Parameters.Id }"/>
The Image Sync component contains one parameter, namely recordId. The recordId uses the following syntax to refer to the current Visualforce page with its corresponding parameters.
{! $CurrentPage.Parameters.Id }
For more information about how to use the SharinPix Image Sync, you can refer to the articles below:
The SharinPix Visualforce Component
The syntax of the SharinPix Visualforce component is as follows:
<sharinpix:SharinPix parameters="{'Id': '{!CASESAFEID($CurrentPage.parameters.Id)}', 'abilities':{'{!CASESAFEID($CurrentPage.parameters.Id)}':{'Access': {'image_upload':true,'image_list':true,'see':true,'image_delete':true}}}}" height="600px"/>
The following parameters are used inside the SharinPix Visualforce component:
- height : refers to the height of the SharinPix Album in pixel units. Here it is set to 600px.
- parameters : refers to the set of SharinPix Abilities enabled or disabled in the SharinPix Album.
The parameters parameter contains:
- An Album Id corresponding to the record Id containing the Visualforce page. This value is passed through the formula function CASESAFEID() which makes sure than the value corresponds to a 18-character record Id. The Album Id syntax is as follows:
'{!CASESAFEID($CurrentPage.Parameters.Id)}'
CASESAFEID() is a formula function that replaces the 15 character ID (case sensitive) with a 18 character ID (case insensitive).
- A set of abilities referring to the abilities allowed on the SharinPix Album.
'Access': {
'image_upload':true,
'image_list':true,
'see':true,
'image_delete':true
}
For more information about the SharinPix abilities, refer to the following article: SharinPix abilities
Creation of the Visualforce Page
Follow the subsequent steps to create and add the Visualforce page:
- Create a Visualforce page using the code snippet below.
<apex:page standardController="Contact">
<sharinpix:SharinPix parameters="{'Id': '{!CASESAFEID($CurrentPage.parameters.Id)}', 'abilities':{'{!CASESAFEID($CurrentPage.parameters.Id)}':{'Access': {'image_upload':true,'image_list':true,'see':true,'image_delete':true}}}}" height="600px"/>
<sharinpix:ImageSync recordId="{! $CurrentPage.Parameters.Id }"/>
</apex:page>
- Save the Visualforce page when done.
- Add the newly-created Visualforce Page to the layout of the Contact object.
- Add an image.
- Refresh the current web page. Go to the SharinPix Images(1) section. You should see a new entry(2).
- Click on the new entry. You will be directed to the SharinPix Image Record of the newly-uploaded image. You should see the details of the image as displayed in the figure below.
0 Comments
Add your comment