Reputation: 139
we have requirement that when email is received in to crm with attachments ,we need to pass to API the Attachment details for that email so can be stored. does someone have the data model of how the email attachments entities are linked. As i know there is activitymimeattachment and also attachment.
Or if anyone has past experience of passing through the values to API? Thanks
Upvotes: 1
Views: 2171
Reputation: 5531
If I understand your requirement correctly or I assume your requirement is to download the attachments for all the incoming Emails to CRM.
Based on assumption of Requirement,
Here is the sample Fetchxml for you
<fetch>
<entity name="email" >
<attribute name="attachmentcount" />
<attribute name="subject" />
<attribute name="mimetype" />
<link-entity name="activitymimeattachment" from="objectid" to="activityid" link-type="inner" >
<attribute name="filename" />
<attribute name="filesize" />
<attribute name="attachmentid" />
<link-entity name="attachment" from="attachmentid" to="attachmentid" link-type="inner" >
<attribute name="body" />
</link-entity>
</link-entity>
</entity>
</fetch>
Upvotes: 1