web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Clone a Custom Entity Record

(0) ShareShare
ReportReport
Posted on by

Hi, 

I have a custom entity that I need to be able to clone in Dynamics CRM Online. I've seen a lot of stuff out there while researching how to best go about this, but I'm having trouble figuring out what approach to take. I'm currently using javascript and an html web resource (just a button) to clone my record, but my record has many attributes, and I find myself essentially just writing a list of variable to hold the attribute values and then moving them into the fields on the new form. My new, cloned form pops up on click of the button mentioned above. I suppose this will work, but if fields change or are added, it will need to be re-visited and adjusted. 

I have very little experience doing C#, but is there a more reliable way to do this via a plugin? Or a better way to do it via javascript?

To be clear, I need to be able to clone my custom entity record, but leave one field (a date field) blank, so that a new value can be put in by the user. It is an "event/class" entity, and there could be the same event/class on multiple days, so I want to clone everything except the date.

Thanks for any help.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    BharatPremji Profile Picture
    2,485 on at

    Hi,

    Have you thought about doing it through a workflow?

    You could trigger it off a button in the ribbon with Javascript using something like:

    ribbonworkbench.uservoice.com/.../132235-create-a-workflow-short-cut-ribbon-button-no-code

    The benefits of using workflow is that its easily configuarable if fields change or are added.

    I have done something similar in the past using a Dialog when you want user input into the new record you are creating.

    Hope that helps

    Bharat

  • fishyjj Profile Picture
    on at

    Thanks for your reply. How would I do this via a workflow?

  • Verified answer
    Rafael Batista Profile Picture
    on at

    Hello,

    You can create  a workflow and tick the checkbox "On demand". By this way, the workflow can be selected from the entity form you want to clone.

    On the process panel of the workflow, you have to create an identical entity and fulfill the fields from the new entity form. You just have to point to the corresponding values from the actual entity from which you are running the workflow.

    Beware of the duplication rules,  make your you don't have rules enabled for these entity types.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans