Wednesday, April 1, 2009

Cloning Entity in Dynamics CRM 4.0

We had a request for Cloning an Entity in Dynamics CRM.
For acheiving this functionality, I have followed the following steps.
  1. Added a field called "createdAsCopy" which is a bit field
  2. Added a field called "referrerEntityID" which holds the EntityID which is to be cloned.
  3. Created a manually run WorkFlow called Copy Entity which copies all attributes to the new entity and flags the attribute "createdAsCopy" as "Yes" and fills "referrerEntityID" with EntityID of Entity which is to be Cloned
  4. If there is any plugin-code (post-Create) should read the createdAsCopy and do the necessary creation of related entities.
Here is one link I got from Internet (regarding Cloning Entity) with an alternative approach.

http://mscrm4ever.blogspot.com/2008/06/cloning-entity-using-javascript.html

No comments:

Post a Comment