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

Announcements

No record found.

News and Announcements icon
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

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

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

  • Suggested answer
    Rajesh Chungath Profile Picture
    467 on at
  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    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

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans