Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

If a field changes on the existing parent record how can I get that new value to show on the existing child record

Posted on by 2,645

Hello,

If I have an existing record (opportunity record), that has a field on it (lets call it field A), and it has a value of 1200 in it.  My existing child record has the same type of field as Field A and when this record is created, it takes Field A value from the opportunity and places it into this field on the Child record.  Now, is there a way that when the parent record changes Field A, can it also update the existing child record?

Thank you.

*This post is locked for comments

  • JoeO Profile Picture
    JoeO 230 on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Thanks again Andrew for the response. Really appreciated!

    The update record step "UWT: Bulk Operations:Update Records" will always fail unless a relationship is specified. I tried adding a FetchXML which would return the record to be updated (itself), but it still fails because the relationship is empty

    Update:
    I just needed to remove the "Record" value, because its only using FetxhXML. My Bad. Its working fine. Awesome stuff! Thanks Andrew!!!

    Update-Record-Step.png

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    In update record step there is a possibility to define just fetchxml. That should do the trick for you.

  • JoeO Profile Picture
    JoeO 230 on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Thanks Andrew for the response.

    The problem is that the "Update Records" setup (UWT: Bulk Operations:Update Records) requires a relationship name. In my case, im updating a lookup field on the very record thats triggering the workflow, its updating its-self, there are no relationships to specify. if i run it without specifying a relationship, the workflow fails "Reationship Name Parameter is empty!". I also cant the use the regular "Update Record" workflow step, because that would not allow me to use a dynamic value if its not from another lookup field pointing to the same entity.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Theoretically possible. Here is what you can try to do:

    1. Create a query to lookup E4 based on E1 and E2 values. NEw String Concatenation can be helpful.

    2. Use set lookup based on query step of Request Builder.

    3. Create query to filer out only that record that should be updated.

    4. Use "Update" record using recordset from 3 and Request created on 2.

  • JoeO Profile Picture
    JoeO 230 on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Thanks for for the response Andrew! Thats pretty much what i did, but it wasnt working me, until i slapped myself on the head for missing something so simple. I was looking to create a filter for a lookup field. A lookup field needs the "value = {GUID}". I just needed to add a step to get the GUID, and then pass that to the FethXML filter query. All good now.

    One last question, if a may. Im looking to perform the following (is possible):

    This involves 4 entities, lets call them E1, E2, E3 and E4.

    E4 has a lookup field to E1 and E2. E3 has a look up field to all 3 (E1, E2 and E4). I wish to have a workflow on the E3 entity (upon record creation) that would update the E4 lookup field, based on whats in E1 and E2. In may case, its always only going to match a single E4 record. For example, lets assume that the E1 record is called "E1 record" and so on for the rest. Im only going to have a single E4 record if querying the E4 entity for "E1Lookup_Field = 'E1 Record" and "E2_Looup_Field = E2 record"

    If the question is clear enough, is this achievable with UWT?

    Meant to include:

    I get it working to the point of retrieving the correct GUID of the record i wish to locate, but im not sure how to set the lookup field. Im trying the "Set Lookup from FetchXml Query", the WF is successful, but its not doing anything

     

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Joe,

    You can use Advanced Find, export FechXml and take "Filter" piece of it. Something like:

    <filter><condition attribute="statecode" operator="eq" value="0"/></filter>

    that is filter that will return only active records.

  • JoeO Profile Picture
    JoeO 230 on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Apologizing for stealing this forum. Ill start a new one if needed.

    Andrew, really quick question. Im looking to update only specific child records (if child record field value eq 'something'), so i can use a FetchXML, and even use Dynamic values if i wanted to FetchXML query to change based on an option i selected on the parent record (if both the parent and child have the same lookup field). Could you please help me describe the "Additional XML Filter" field in the WF and the format i'd use on that field?

  • JoeO Profile Picture
    JoeO 230 on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Ah got it, just need to set a "Set Field" step in a previous step, and then refer to it in the follow up "Update Record" step. Cool, seems to work.

  • JoeO Profile Picture
    JoeO 230 on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Hey Andrew!

    Im trying to use UWT to update child records using a N:N relationship, but I cant seem to figure it out how to specify the field name of the child record i wish to update and the value to set. I give it the record URL and the relationship name, the workflow is successful, but its obviously not doing anything

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: If a field changes on the existing parent record how can I get that new value to show on the existing child record

    Hi ,

    Please have a look below references-

    dyn365pros.com/.../display-parent-entity-fields-using-calculated-fields-in-dynamics-365

    community.dynamics.com/.../calculated-fields-and-parent-entities

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans