Microsoft Dynamics CRM 2011 – Add picture to contact/lead forms using SRS report

By - October 14, 2011

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:

  1. 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.
  2. Create an SRS report that displays the picture, using the annotation entity (notes) in the dataset.
  3. 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).
  4. 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

Follow Bill on Google+

Bill Caldwell is a director and lead Microsoft Dynamics CRM consultant in the Denver, Colorado practice.  Bill is a certified Microsoft Dynamics CRM consultant and specializes in customizations, reports, customized queries and integrations.  Bill is an active member of the Dynamics community since joining RSM in 2007.  Bill is also experienced with the Microsoft development suites, which includes SQL Server, Visual Studio.Net and SQL Server Reporting Services.  Prior to this, Bill spent five years working in industry as an accountant and financial analyst. Contact Information: Email: Bill.Caldwell@rsmus.com Phone: 303.298.6465 Follow Bill on Google+

Receive Posts by Email

Subscribe and receive notifications of new posts by email.