Pulling pictures from Salesforce files to a form

In Salesforce Lightning you can add to Forms pictures saved in Salesforce files.

You need to create a new custom field with a URL to the picture file in Salesforce and add the custom field to the Data Model of the Form.

The following sections provide a step-by-step description of what you need to do.

Step 1: Add a new custom Text Area (Long) field to the object from which you want generate the output

  1. In the object’s Fields&Relationships, click New.

2.Select the Text Area(Long) data type and click Next.

3.In the New Custom Field window anter a name for the new custom field and click Next.


4.Click Next to establish field level security, then click Save.

Step 2: Create a URL for the image file

  1. In Files browse to the file of the image you want to add to the form.

Note: If the file does not exist you can upload the file to Salesforce.

2. Click the arrow next to the record line  and select Public Link.

3. In the Public Link Sharing page click Create Link. The Create unrestricted publick link? page is displayed.

4. Click Create. The Public Link Sharing page is displayed.

Step 3: Add the link to the new custom field.

  1. In the Public Link Sharing page, click Copy Link.
  2. Open a new browser tab and paste the link. The image is displayed.
  3. Right-click the image and choose Copy image address.
  4. Go to the Object to which you added the custom field.
  5. In the Details tab scroll to the new custom field and paste the copied address.

Step 4: Add the Image custom field to the Data Model

  1. Open the data model of the Form to which you want to add the image.
  2. Add the new custom field to the data model as an applicative tag (interactive is not supported). See Defining a Data Model.

Step 5: Add the image tag to the Form in the Designer

  1. Open the Form in the Designer and insert the image field tag as picture.