Salesforce Image Field

In this Salesforce tutorial, we will learn to add an image field in a Salesforce object. We will discuss the method of creating an image field with the help of a standard object in Salesforce, and you can follow the same method to add an image field in a custom object.

Image field in Salesforce

There is no built-in feature in Salesforce for adding an image to field records. To solve this issue, a custom image field is created using the rich text edit data type.

This custom image field helps us associate an image with a record in Salesforce standard and custom objects. The images in objects better visualize the data and information of records, such as product images and company logos.

In the below examples, I will explain the method of creating a custom image field in Salesforce with the help of examples.

Create an Image Field in the Salesforce

To create an Image field for an object in Salesforce.

1. On the Setup page of Salesforce Lightning, click on the Object Manager tab.

Salesforce Lightning add an Custom Image field to an object

2. In the Object Manager, we can see a list of Standard and Custom objects. From here, select an object to which you want to add an image field. In this example, I have selected the standard object Products to add an image field.

Create an Image field in Salesforce Lightning

3. To set up the selected object, go to the left sidebar and click on Fields & Relationships.

Add an Image field in Salesforce Lightning

4. The Fields & Relationships section contains a list of custom and standard fields. Click the New button to create an image field.

Create a new Image field in Salesforce Lightning

5. Here, we have to select the data type for the image field, and for this, we will select the data type Rich Text Area by activating the radio button. We are selecting Rich text Area data type, click on the Next button.

Add an Image field to object in Salesforce Lightning

6. Here, we enter the required details. In the Field Label field, enter the label for the image field as Product Image. The Field Name will be auto-filled according to the entered Field Label. Add a description for the image field in the description text area. Click on the Next button.

Salesforce Lightning add an Image field

7. Now establish field-level security for this custom field. I have activated the checkbox Visible to make this field visible to all users, and after this, click on the Next button.

Create an Image field in Salesforce Object

8. Now activate the page layouts of the object to make this field visible on the pages, and after that, click on the Save button.

Salesforce Lightning add an Image field to an object

9. Go to the App Launcher on the setup page, search for the Product object, and select Products under the heading Items. In the Products, click on the dropdown of the record in which you have to add an image and click on the Edit option.

Salesforce Lightning add image from Image field

10. Go to the custom image field that we created, click on the image icon in the text editor, and upload the image from your system.

Create a new Image field to an object in Salesforce Lightning

11. After uploading the image, click on the Save button to apply changes to the record.

Salesforce Lightning add an Image field to a Standard object

12. The image will be added to the object’s record page. In the record, you can view the image in the created image field section.

Create an Image field in Salesforce Lightning Object

Now, you can see that the image was also successfully added with the help of the image field. So, this is how we add an image field to an object in Salesforce.

See also  Create Custom Object Salesforce

Conclusion

In this Salesforce tutorial, we learned how to create a custom image field for an object in Salesforce and discussed the method of creating an image field. After successfully creating an image field, we also added an image to the object records in which we added the image field.

You may like to read: