Hello,
What is the best approach to clone records in CRM (specifically quotes and orders and their respective line items)?
I know this can be done by using an ASP.NET page and many other ways.
I also want to open the cloned record to user when the cloning process finishes.
Thanks :)
*This post is locked for comments
i came across the same scenario, but looking for Javascript command, Kindly suggest me.
Hi Zmk,
Kindly check the below tool which will satisfy your needs. Apart from copying data of quotes and orders and their respective line items, this tool also offers options to copy the data from one entity record to another entity along with the relationships. Using this tool you can open newly created record. You can also update the newly records while cloning the records.
https://www.inogic.com/product/productivity-pack/click-2-clone-microsoft-dynamics-crm-records
Thanks!
You can take trial of ZapObjects Copy Record App too:
https://zapobjects.com/apps/zap-copy-record/
The app allows copying or cloning of record in single click. Once cloned, the newly created record is automatically opened up too!
Create a button called Clone (as suggested in previous comments), and call an Action from it.
You can use process.js to call the Action:
You can use a workflow to set the values or use the following code using a plugin (sample is for Case Entity):
The logic is pretty simple. You will need to retrieve your case entity record, and create a new case (which will return your new case id).
Then you need to do a retrieve multiple on all child records, and do a create for each one. See sample below:
Entity sourceCase = service.Retrieve("incident", caseId, new ColumnSet(true));
Guid targetCaseId = CreateCase(sourceCase);
// Retrieve All Child Records of Case
// You will need to do this for each type of child record
EntityCollection childRecords = service.RetrieveMultiple(query);
if (childRecords.Entities.Count > 0)
{
foreach (Entity child in childRecords.Entities)
{
// Similar logic as the Create Case function
CreateChildRecord(child);
}
}
private Guid CreateCase(Entity sourceCase)
{
Entity targetCase = new Entity("incident");
foreach (KeyValuePair<String, Object> attribute in sourceCase.Attributes)
{
string attributeName = attribute.Key;
object attributeValue = attribute.Value;
switch (attributeName.ToLower())
{
case "scag_incidentid":
break;
default:
targetCase[attributeName] = attributeValue;
break;
}
}
try
{
Guid targetCaseId = service.Create(targetCase);
return targetCaseId;
}
catch (FaultException<OrganizationServiceFault> ex)
{
throw new InvalidPluginExecutionException("An error occurred in the Case function of the plug-in.", ex);
}
}
Hope this helps.
Hi,
Whether it is to clone- Quotes, Orders or any entity including their respective line items can be done with just 1 click using WORK 365 Record Clone App. You may check the free trial at https://www.work365apps.com/record-clone
Yes, once you click on the clone button the new cloned record pops up and is ready to use/edit as per the need.
Hope this helps, for any more details ping me at ella@work365apps.com
Try this free Solution by Cobalt. I've been using this for the last few months and its a great tool to duplicate any record... No need to write code.
http://www.cobalt.net/dynamics-crm-snapshot
Here's a video that show how to clone invoices, but it can be done with any entity.
https://www.youtube.com/watch?v=Iti9nfgomDg
Hope this helps.
Hello,
You can add a custom button on the entity form. On the button click, you can add JavaScript code to launch a dialog. The dialog will create a new record of the same entity with the required details. Also, you can mention the link of the newly created record in the dialog (on a page).
Thanks for the replies. However, Mansoor answer only copy direct data which is not my case. As for daehyun, using OOTB workflow won't open the cloned record once created and also copy direct data.
How about to create on demand workflow in order to create clone records?
And In the quotes view, check the target record and run the workflow.
Hello,
You can try below approach.
dipankarbhattacharya.com/.../cloning-a-record-in-dynamics-crm-2013
Mansoor
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,963 Most Valuable Professional
nmaenpaa 101,156