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)

create a new record from existing record

(0) ShareShare
ReportReport
Posted on by 2,665

Hi,

I need to create a new record(another form of the same entity) from an existing record on a button click. What is the best way of approach to it. A plugin or using javascript? I don't need to open the newly created record after clicking the button. It has to happen in the backend and update a field in the existing record so users know a copy of the record has been created. Please suggest me some ideas. Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dhaval mistry Profile Picture
    810 on at

    my suggestion would be "simple workflow" if you dont have any complex business logic and asynchronous process is fine for you.

    Otherwise I would like to go with plug-in.

    I am NOT suggesting to going with javascript,

    javascript only work from CRM screen but if some third party application (external application) creating record in CRM using CRM Service. Upon creating of that record, you want to create new record in CRM then javascript would not help you in this scenario.

    Please mark suggested answer if suggest guide you

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Roxanna,

    An On Demand workflow would be best for your scenario. You could make the field on the old entity a lookup, and in your workflow you create a new record and then you can set that on the lookup on the old entity. Then your users would know a copy has been created, and there would be a link to it too.

    If you want a button to click, there's a neat no-code solution that lets you create a button to kick off a workflow (everything on the workflow would be the same). ribbonworkbench.uservoice.com/.../132235-create-a-workflow-short-cut-ribbon-button-no-code

    Hope this helps! I'd appreciate if you'd mark this as a Verified answer.

    Thanks,

     Aiden

  • crmprogrammer2013 Profile Picture
    2,665 on at

    Thanks Aiden,

    Your suggestion is good.. but it seems like a dialog appears when button is clicked to run the workflow like a 'Confirm Application of Workflow'. I don;t want it to appear. How do I remove it?

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Roxanna,

    I'm not sure how you'd remove the warning - I haven't used that implementation. There's another approach you could try - write a little javascript to kick off the workflow from that button directly instead of mimicking the workflow button. Check out this javascript library: processjs.codeplex.com It looks like you would only need to call that with the ID of the workflow to run and it should be good. I don't *think* you'll get that confirmation if you run it this way but I haven't done it myself.

    Hope this helps! Please let me know how this goes. I'd appreciate if you'd mark any helpful answers as Verified.

    Thanks,

    Aiden

  • crmprogrammer2013 Profile Picture
    2,665 on at

    Perfect. It worked. Thanks Aiden.

    But can we create related records for the newly created record through workflows?  

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Roxanna,

    You could create child records as part of your workflow if you know what they should be ahead of time. So, if you create a contact in a workflow, you can create a Case for that contact by referencing the newly Contact in the workflow. That would only work if you know what the Case details should be though.

    If you want to clone related records for the record you're copying, you could install a solution I helped build called CRM Snapshot (www.cobalt.net/dynamics-crm-snapshot). Snapshot lets you create a workflow that can clone a record and any of its related records, so you could clone an order and its details.

    Hope this helps!

    Thanks,

     Aiden

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Followup details - it you know what the records are you'd create them in your workflow like this:

    Create A

    Create B1

    - Lookup to A gets set to A

    Create C

    - Lookup to B gets set to B1

    Create B2

    - Lookup to A gets set to A

    This will let you build out a whole tree of records, as long as you know what you want the data to be.

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