With the release of Microsoft Dynamics CRM 2013, a new feature was added, which allowed users to set record specific images. Certain system entities and all custom entities can be enabled to display images in the application.
The following system entities have image attributes.
|Publisher*||Sales Order||Product*||Opportunity Product|
Those marked with asterix (*) are enabled by default to show them in application.
Steps to Enable Entity Image on Form
- Open Form Editor
- Go to Display Tab
- In the Image Section, enable the “Show image in Form” option.
Now create a record and add Entity Image.
After uploading image, record will look like this:
Use Entity Image in Custom Entity
To Add Entity Image in Custom Entity, you first need to create a new image attribute.
The schema name will automatically change when you select Type as Image.
To enable image on form, follow the steps described above.
Programmatically Setting Entity Image
Updating Entity image using code is very much similar to adding any other attribute. Specify the ID of the record you want to update and then set the “entityimage” field to actual bytes of the file.