Monday, June 1, 2015

How to use Image field on Dynamics CRM 2013

When I started using Dynamics CRM 2013, I found a new field type added called "Image". Initially, I thought it would allow developers to put an image on a CRM form and that "Image" can be of any type. Later, I came to realize that the "Image" type is referring an image that is being put to the entity record, which the user can update and change like in Office 365.

Developers can use the "Image" type by following the below steps

For some system entities, the "Image" field is available by default. Each entity has one "Image" field.




Below are the entities which have the "Image" field available by default. Though every entity below has an "Image" field, displaying an image requires an additional step.  In the entity information, developers have to set the "Primary Image" field values to either 'None' or 'Entity Image'.

To display the entity's image record choose the 'Entity Image' option.  Also, at the form level developers have to select 'Show Image' on the form check box.  This way, the CRM record can show an image.


Entity Name
Enabled by default(yes)

Entity Name
Enabled by default(No)
Account
Yes

Article
No
Competitor
Yes

Campaign
No
Contact
Yes

Case
No
Lead
Yes

Connection
No
Product
Yes

Contract
No
Publisher
Yes

Currency
No
Resource
Yes

Email Server Profile
No
User
Yes

Goal
No



Invoice
No



Mailbox
No



Opportunity Product
No



Order
No



Organization
No



Queue
No



Sales Literature
No



Territory
No

Below are the steps to add image to custom entity:

  1. Create a new entity called "Test" for testing of "Primary Image". When we create entity it is clear that Primary Image is not available.

                               

2. To add Primary Image to entity go to fields=>New, Then fill the information and select type as 'Image'. After selecting type as Image "Save and Close" the record.

                       

3.  This field is not available to place on CRM form. (Don’t search this field to put on CRM form.).  
                       


4Now go to Entity definition and select Image name as Primary Image. After selecting this "Save" and "Publish" the entity to see your changes.
                   




5.  Go to entity and create a new record
                 

    6. Now add a picture to this record by clicking on Picture Icon. You can upload picture from your computer or you can use default image.
                                 


    7. I just added an image and my record looks like this
                                      

    No comments:

    Post a Comment

    How to Deploy your API as a web app or API app

      Before you can call your custom API from a logic app workflow, deploy your API as a web app or API app to Azure App Service. To make your ...