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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Newby: Update Related Records

(0) ShareShare
ReportReport
Posted on by 452

I am new to Dynamics 365 although I have coded in other languages.

I have a requirement to add a button to crm to update the child records from an attribute of the parent record

As I understand there is no way to update a child record with the OOTB workflow, is that correct?

I keep seeing people reference "Distribute Workflow Activity" but all the references are to lower versions of CRM and not Online.

Is this the best way to update child records in Dynamics crm?

Does anyone have a link or instructions on how to this to work with Dynmics 365 Online?

Or another solution, as you can tell I am very lost.

Thanks!!

*This post is locked for comments

I have the same question (0)
  • Anoop Kheerwal Profile Picture
    on at
    RE: Newby: Update Related Records

    Are you considering plugins (which requires c# coding)? If yes, it is pretty easy to do this in a plugin.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at
    RE: Newby: Update Related Records

    If you are planning to add a button to the Command Bar, then there are probably many ways of doing that

    I would consider web api and actions

    If you use webapi, I would recommend getting one of the webapi libraries that are available, so that you don't have to reinvest logic (easier to use)

    //

    For Web API (Requirements JavaScript Only)

    - Get the Field that want to update from

    - Call WebAPI RetrieveMultiple to retrieve all records from child entity that have to be updated

    - For Each results from Retrieve Multiple call, Call an Update method on the record passing the id of the records and the changed columns

    //

    For Actions (Requirements: JavaScript, Action via Process and Plugin)

    - Get the Field that you want to update from

    - Call the Action Process (You will need to download the process.js library and add it to your solution)

     - Your will need to pass parameters so that you can query your data

    - Write the Code in the Action/Plugin (You will need to register your action)

    Within your Action:

    - Query the results that you need based on the parameter you passed into an Entity Collection

    - Loop through each element of the entity collection and Update the Entity record

    //

    There are other possibilities, but I think these would be the common ones. The second one seems to be much longer, but actually does not take much more to implement. The bottom line is where do you feel comfortable with. API/REST Calls with JavaScript or JavaScript with Backend C# code.

    //

    Hope this helps.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans