Create a Query using the Advanced Find in CRM 2011, download the FetchXML from it and edit the file. The actual image is stored in a field which isn’t visible in the CRM GUI, it’s called documentbody. Here’s an example with it in, if you add this code below to your SSRS Dataset then it will show you all notes created this month with the image. Then simple add an <Image> from within BIDS and set the image properties field to the documentbody and MIME type to jpg, gif, png etc..
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="annotation"><attribute name="subject" />
<attribute name="notetext" />
<attribute name="filename" />
<attribute name="annotationid" />
<attribute name="overriddencreatedon" />
<attribute name="documentbody" />
<attribute name="ownerid" />
<attribute name="annotationid" />
<attribute name="filesize" />
<order attribute="subject" descending="false" />
<filter type="and">
<condition attribute="createdon" operator="this-month" />
</filter>
</entity>
</fetch>
Works a treat J
Hmm. We are trying to use the documentbody atribute to display an image in a report, but the fetch is only returning the first 2000 characters of data for the image. Any ideas what the problem might be?
ReplyDeletethanks for the info! do you also know how to return to image of Service>Employee Entity?
ReplyDeleteExcellent post! Works perfectly. Thank you
ReplyDeleteIs it possible to retrieve multiple note attachments ? I need to retrieve the initial 4 attachments in the FetchXML report
ReplyDelete