Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Merging Two Contacts - Behavior of Business Process Flow

Posted on by 40

When doing a Merge on two Contact records with the out-of-the-box process if there is an associated business process flow on the Contact records, does it always merge using the child side?

Example:

Have two Contacts similar to below.  Note the business process flow in the top Contact is on the third step while in the bottom Contact is on the second step.

pastedimage1620649255577v1.png

pastedimage1620649292227v2.png

Selected the two Contact records and doing a Merge similar to below using the second Contact above as the parent....

pastedimage1620649497544v3.png

After the merge, noticing that the parent record appears to always update with the state of the Business Process flow from the child record.

pastedimage1620649752744v4.png

In example above after the merge, the parent record which was originally in the second stage of the BPF advanced to the third stage of the BFP which matched the child record.

On the Merge Contacts box when doing merge, there is a Current Stage Time.  Is this associated with the BPF?  

Are there any options in the out-of-the-box merge process to choose whether we want to maintain the original stage on the BPF on a Contact during a merge instead of merging from the child record? 

In a similar scenario to the one above, I see that after the merge process completes, when looking directly at the table associated with the BPF that it appears to add a second record to the table.  The BPF that appears to display on the associated contact record seems to be whatever the latest row that was added to the BPF table. 

pastedimage1620650148869v5.png

  • jlmccormack Profile Picture
    jlmccormack 40 on at
    RE: Merging Two Contacts - Behavior of Business Process Flow

    Yes, looks like this would be a good solution for me.  Appreciate your assistance very much!

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Merging Two Contacts - Behavior of Business Process Flow

    Hi jlmccormack,

    Maybe you can refer following link to switch process automatically:

    (+) How to Switch Business Process Flow automatically - Dynamics 365 Customer Service Forum Community Forum

    Regards,

    Leah Ju

  • jlmccormack Profile Picture
    jlmccormack 40 on at
    RE: Merging Two Contacts - Behavior of Business Process Flow

    Is there a flag somewhere on either the contact table or the associated BPF table that determines what process is active?  This is really close to what I am looking for but wondering if there is a way to programmatically set the process on the parent record in this scenario so manually clicking Switch Process isn't needed.  Could this be done with JavaScript using setActiveProcess or something similar?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Merging Two Contacts - Behavior of Business Process Flow

    Hi jlmccormack,

    Through my test, the result is indeed as you described, parent contact’s BPF ribbon will not be displayed by default after updating the bpf_contactid back to the child recorded.

    You need manually switch the bpf process in the parent contact form.

    Expand ‘Process’ to click 'Switch Process' to open one dialog, then select the bpf you need and click OK button.

    pastedimage1620875471037v1.png

    Then you will notice that BPF with current stage diaplays in the form.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • jlmccormack Profile Picture
    jlmccormack 40 on at
    RE: Merging Two Contacts - Behavior of Business Process Flow

    One other question - instead of deleting the associated bpf record on the child record, is there a way to update the bpf_contactid with the child record id and still see the bpfs on both child and parent?  When I attempt such an update, then I do not see the bpf flow on the associated parent record.

    Example:

    Two contact records merged

    After merge, the associated table for the bpf shows two records with the bpf_contactid of the parent record

    If leaving both as is and pulling up the parent record, it will show the bpf of the child record

    Instead of deleting the row which used to have the bpf_contactid of the child record, update the bpf_contactid back to the child recordid

    What I am noticing is after doing this, if pulling up the child record, I see the bpf on the inactive record which is expected.  However, if I pull up the bpf on the parent record, it shows no bpf ribbon at all.

  • jlmccormack Profile Picture
    jlmccormack 40 on at
    RE: Merging Two Contacts - Behavior of Business Process Flow

    Very helpful.  This looks like a great workaround.  Appreciate the information.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Merging Two Contacts - Behavior of Business Process Flow

    Hi jlmccormack,

    Through my test, parent contact does update BPF stage with the stage from the child contact After merging two contacts.

    pastedimage1620716344160v1.png

    After merging the two contacts,  i found two related bpf records with different stage, which means that instead of the parent contact's original BPF stage being changed, the contact lookup field of the child cotact's BPF is updated to the parent contact .

    pastedimage1620717229769v2.png

    So you can change parent contact bpf stage manually or delete updated bpf record.

    For deleting updated bpf records, you can try to create a workflow in BPF you created to achieve it automatically.

    pastedimage1620720085470v4.png

    Note: no OOB delete function in workflow, you need download following solution to  achieve it.

    https://github.com/demianrasko/Dynamics-365-Workflow-Tools

    After deleting one bpf record that stage is stage2, the parebt contact bpf stage update to original stage.

    pastedimage1620718238745v3.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans