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)

Update child entity fields from Parent entity

(0) ShareShare
ReportReport
Posted on by 60

I am trying to update values of a child entity from a parent entity ( statusreason value from opportunity)

If the statusreason value of opportunity is ____

    update another status field in the child entity (which is a custom entity) as ______

I couldn't do using workflow because my custom entity is not displayed in the related entities list.

I didn't use microsoft flow because i don't want to trigger the opportunity entity every time someone changes the opportunity form.

Please suggest me best solution or any sample code.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Update child entity fields from Parent entity

    Hi,

    You can go with custom plugin or custom workflow for your requirement.

  • Suggested answer
    Rajesh Chungath Profile Picture
    467 on at
    RE: Update child entity fields from Parent entity

    You required custom implementation

    Source Code: github.com/.../Dynamics365v8

    Instructions: github.com/.../Update%20Child%20Records.md

    www.thrives.be/.../run-workflow-on-child-records

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at
    RE: Update child entity fields from Parent entity

    Hi,

    The best solution is to go with the custom plugins.

    There is another approach by using a workflow. However, we don't recommend this but if you don't have any expertise in plugins then you can go with this approach.

    Create a workflow on the child entity

    • Workflow properties
    • Scope organization
    • Run as a child workflow
    • Run on create
    • A background workflow

    Workflow steps

    • Select wait until condition and select the parent entity with a status filer condition.
    • Inside the wait condition. Change the status of the child entity.
    • Call Child workflow and select the current workflow
    • Stop the current execution.

    Description

    The workflow will run on the creation of the child records and wait until parent entity status change.

    It will perform the required functionality and wait again for the next update.

    Disadvantages

    If you have many child records then system jobs will slow down gradually. The number of waiting jobs will affect system performance.

    If found useful, please mark this answer as verified.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: Update child entity fields from Parent entity

    You can write a plugin that trigger on Set state (Status Change) of opportunity.

    You also can go for custom workflow assembly.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
UllrSki Profile Picture

UllrSki 2

#1
Community Member Profile Picture

Community Member 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans