# 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.

```html
<sharinpix:ImageSync recordId="{! $CurrentPage.Parameters.Id }"/>
```

The resulting visual force page will be then be composed at least by :

1. [The SharinPix Image Sync component](#the-sharinpix-image-sync-component)
2. [The SharinPix Visualforce component](#the-sharinpix-visualforce-component)

## The SharinPix Image Sync Component

The syntax of the SharinPix Image Sync is as follows:

```html
<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.

```javascript
{! $CurrentPage.Parameters.Id }
```

{% hint style="info" %}
For more information about how to use the SharinPix Image Sync, you can refer to the articles below:

* [What is SharinPix Image Sync?](/documentation/image-sync/what-is-sharinpix-image-sync.md)
* [What are the uses of Image Sync ?](/documentation/image-sync/what-are-the-uses-of-image-sync.md)
* [Setup SharinPix Image Sync](/documentation/image-sync/setup-sharinpix-image-sync.md)
  {% endhint %}

### The SharinPix Visualforce Component <a href="#the-sharinpix-visualforce-component" id="the-sharinpix-visualforce-component"></a>

The syntax of the SharinPix Visualforce component is as follows:

```html
<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:

1. **height** : refers to the height of the SharinPix Album in pixel units. Here it is set to **600px**.
2. **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 I&#x64;**.** The Album Id syntax is as follows:

```apex
'{!CASESAFEID($CurrentPage.Parameters.Id)}'
```

{% hint style="success" %}
**Tip:**\
\
**CASESAFEID()** is a formula function  that replaces the 15 character ID (case sensitive) with a 18 character ID (case insensitive).&#x20;
{% endhint %}

* 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
}
```

{% hint style="info" %}
For more information about the SharinPix abilities, refer to the following article: [SharinPix abilities](/documentation/access-and-security/sharinpix-abilities.md)
{% endhint %}

### Creation of the Visualforce Page <a href="#creation-of-the-visualforce-page" id="creation-of-the-visualforce-page"></a>

Follow the subsequent steps to create and add the Visualforce page:

* Create a Visualforce page using the code snippet below.

```apex
    <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.

![](/files/SdP20pW1FAB2fOexx3SB)

* Add the newly-created Visualforce Page to the layout of the **Contact** object.

![](/files/beIksb3jBdVUgHlSDGwt)

![](/files/SdP20pW1FAB2fOexx3SB)

![](/files/oss0e7jXoDAwdPnCgDAV)

* Add an image.

![](/files/8R6tJVAsWZGKS8OzlE7t)

* Refresh the current web page. Go to the **SharinPix Images(1)** section. You should see a new entr&#x79;**(2).**

![](/files/tW2q3eTRj8cYzHpWrhkW)

* 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.

![](/files/EpKz9ZtyneTMPr4mSgJ0)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sharinpix.com/documentation/image-sync/enable-image-sync-for-classic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
