Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

What will be the best approach to handle child entity and parent entity record update.

(0) ShareShare
ReportReport
Posted on by 2

Hello All Experts,

I have come across a scenario need your support.

I have two entities Entity A and Entity B.

having 1:N relationship.

Entity B is placed as subgrid on entity A.

when i go to create the Entity B record i want to update one of the field of the Entity A record with the value of optionset present on Entity B form.

How to achieve this kindly help me resolving this.

*This post is locked for comments

  • Verified answer
    EmployeeOcta Profile Picture
    EmployeeOcta 2 on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    I have written a plugin on the child entity and based on that updated the parent entity record.

  • Somesh2207 Profile Picture
    Somesh2207 1,563 on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    We should be able to do this on workflow which will trigger on update of "Entity B". If you are not able to see "Entity A" record on the workflow, there is something wrong with the relationship set up.

    Can you please paste the screenshot of relationship data of Entity A and Entity B. I want to see it is 1:N, or N:N.

    You can get the relationship information by Navigating to Entity A under Entity customizations.

    Thanks

    Somesh Siripuram

  • EmployeeOcta Profile Picture
    EmployeeOcta 2 on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    I will Explain Scenario,

    First I load Entity A form and fill some data on that form and save that form.

    ones the forms get saved the Entity B subgrid gets enabled for (+) sign and i click on that + sign to fill the record for entity B form.

    on the Entity B form there are are some optionsets values.

    I select one of the optionset from Entity B form and save it and comes back to Entity A form it gets reloaded and subgrid shows the record.

    Now i want to update the Entity A with the values of subgrid.

    Hope you guys now able to understand the scenario.

  • EmployeeOcta Profile Picture
    EmployeeOcta 2 on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    Hello Azwar,

    Opportunitytype is Entity B in my case i.e. child entity.

    Hello Somesh,

    since Entity A is lookup on Entity B , this is not the case.

    Entity A contains subgrid for Entity B.

  • Suggested answer
    Somesh2207 Profile Picture
    Somesh2207 1,563 on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    [quote user="EmployeeOcta"]when i go to create the Entity B record i want to update one of the field of the Entity A record with the value of optionset present on Entity B form.[/quote]

    Based on this, I am assuming that you want to update the value on the Parent record when the value on the child record is updated/ set.

    This can be easily done using workflow. So you need to create a workflow on Entity B (on update of the Optionset field),

    In the workflow, you can do update operation on Entity A (since Entity A is lookup on Entity B) based on the value from record of Entity B.

    let me know if this is not clear, then I can post some screenshots of example.

    Kindly mark this as Answer if this resolves your query.

    Thanks

    Somesh Siripuram

    Dynamics CRM Expert

  • M.Azwar Alam Profile Picture
    M.Azwar Alam on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    Opportunity Type is child entity or parent entity ?

  • EmployeeOcta Profile Picture
    EmployeeOcta 2 on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    Hello Azwar,

    I cannot see the video as it's blocked buy our network admin,

    second thing while trying to create the workflow not able to select the relational entity from the Entity B.

    Below is screenshot.

    oportunitytype.PNG

  • Suggested answer
    M.Azwar Alam Profile Picture
    M.Azwar Alam on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    You can check this video as well

    www.youtube.com/watch

  • Suggested answer
    M.Azwar Alam Profile Picture
    M.Azwar Alam on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    You need add update step in WF and then select your parent child relation of entity A to Entity B and then click on Update. It will open the Entity A Form and then set values

  • EmployeeOcta Profile Picture
    EmployeeOcta 2 on at
    RE: What will be the best approach to handle child entity and parent entity record update.

    Hello Azwar,

    How can i get the field name of the parent in the workflow of child enity.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,403 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans