Friday, May 18, 2012

Cloning a Custom Entity Record

Posted in [Dynamics CRM], [Technical] By Sue McAlexander @ 10/28/2009 1:36 PM

There are several nice examples that show how to clone a record in MS CRM. Most of the examples I found cloned native entities: Cases, Contacts, Opportunities, etc.

 

 
I needed to clone a custom entity and ran into problems during testing. The process for modifying the ISV config file and HTML code was fairly simple. But, when I tested the button, it would “hang”. Through the debugging process, I realized that the call to open a new form wasn’t quite right.
 
Since I was cloning a record for a custom entity, I needed to provide something that identified which custom entity I was cloning: the entity type code. I could find this value by opening a “new” record for the custom entity and look for “etc=” in the URL. This attribute needed to be added to the edit command.
 
The code to open a new form would now look like:
oClonedContact = window.open('/UserDefined/edit.aspx?etc=10006','','menubar=0, status=1, width=1000, height=600');
 
Once I modified the HTML script and cleared out my browsers cache (deleted temporary internet files), the button worked perfectly!
 
Other helpful references for cloning records:
Popular tags: ,

Comments

Got something to say? Join the discussion »

leave a reply

 [Quick Submit with Ctrl+Enter]

Remember my details
Notify me of followup comments via e-mail

C5_Insight

About C5 Insight

We are a Microsoft Gold Certified partner focusing on SharePoint, Microsoft Dynamics CRM and Salesforce.com.  Learn more about us by visiting our website.

Search

We Wrote the Bible on Microsoft SharePoint and Dynamics CRMBook-Microsoft Dynamics CRM 2011 and SharePoint 2010 Bible

Tags

Maximize

Recent Comments

Maximize

Blog Roll

Maximize

Disclaimer

The information herein may be used solely at your own risk.  No warranty is made by the author or by C5 Insight, Inc.

The opinons expressed herein are those of the individual authors and do not necessarily represent C5 Insight, Inc in any way.

Copyright 2011 by C5 Insight