Recently, I needed to display existing pictures (and provide the ability in Microsoft Dynamics CRM to add additional ones) for contacts and leads in Dynamics CRM on the respective forms. One problem was that there were already thousands of pictures and they were already stored as jpeg files with a integer value as the name of the picture (i.e. 142.jpg) and this identifier was already stored in Dynamics CRM on each contact or lead (for the purposes of linking to legacy application).
Additional considerations were that I wanted to use SRS for the picture and I wanted to give the user the ability to upload the picture in the notes area of the contact or lead. If you don’t need to migrate from a file server, you can skip Step 1.
There are a few different parts to this and they can be summarized as follows:
- Migrate all of the pictures (stored on a file server) over to the annotation entity for the contacts and leads. This in itself is pretty cool if you ever need to upload pictures to Dynamics CRM. I cheated a little bit using Scribe Software. I also created a quick .net app for parts of this that I will detail out in subsequent post. The details for this step can be found in a more recent post Migrate documents on file system to Microsoft Dynamics CRM 2011 as attachments.
- Create an SRS report that displays the picture, using the annotation entity (notes) in the dataset.
- Insert an Iframe on the contact and lead forms that points at your SRS Picture report, passing in the id and the type (2=contact, 4=lead).
- To test, insert an attachment on an individual contact or lead and give it the subject of “picture”.
Please comment if you want the details for any/all of the steps above. For now and for some folks, the summarization above should give you an idea of how you would go about this.
By: Bill Caldwell – Director of McGladrey’s Microsoft Dynamics CRM practice, Denver, Colorado