Saturday, April 25, 2009

Tech Tip: Migrating Attachments

It seemed like an easy task: Migrate attachments from a record in one entity in Microsoft Dynamics CRM to another.

And it is. The hard part is finding out how to do it. After a week of trying to get an answer, a great deal of trial and error, and feeling much like Thomas Edison, who said he succeeded in inventing the light bulb only because he'd run out of ways that he could fail, I have the migration of attachments from one CRM entity to another working. And it's very simple. This solution, as with most of our migration solutions, makes use of the tool called Scribe, which we recommend to anyone performing migrations into Dynamics CRM. The following assumes that you have Scribe in place and are familiar with the basics of creating a Scribe dts (data translation specification).

Here it is:
Step 1: Seek on the record using whatever parameters will give you a unique match.
Step 2: Insert Annotation, with the following fields mappings:

Target Ownerid Formula = DBLookup(SXX,"T","SystemUser","FULLNAME","SystemUserId") Where SXX=Source OwnerIdName (Copy and Paste the Rest)
Source Subject > Target Subject
Source Filename > Target vfAttachmentFileName
Source DocumentBody > Target vfAttachment

Nothin' to it! Go forth and conquer!

1 comment:

  1. Hi, I am wondering if you have ever migrated email data and how it was that configured things for the from/to/cc/bcc fields etc. I would really appreaciate any information you could provide.