Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Workflow to clear related records?

Posted on by 74

Is there a way to use a Process /  Workflow to remove all related records from a table?  Specifically, I want to clear all the Members (they are Leads) from a Marketing List as part of a process.  I don't want to delete the Leads, just remove them from the Marketing List. 

We have a third party solution that syncs Marketing Lists for bulk email operations.  We'd like to be able to select one or more Leads and add them to that list (easy), but also clear out any older, existing members. 

If I can't do this via a process, what is the jscript approach to doing this? 

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Workflow to clear related records?

    Hi GBarkin,

    So you still want to achieve it through flow? Or accept the function of the "Manage Members" button in the answers above?

    If you have found the answer, don’t forget to click Yes under "Did this answer your question?" to close this thread.

    Thanks.

  • GBarkin Profile Picture
    GBarkin 74 on at
    RE: Workflow to clear related records?

    "Workflow does not have the function of searching records, we will have to use Power Automate (flow) to achieve it."

    That's what I figured.  Thanks.

  • Verified answer
    LuHao Profile Picture
    LuHao 40,872 on at
    RE: Workflow to clear related records?

    Hi GBarkin ,

    As mentioned in the answers above, the easiest and fastest way is through Manage Members > Remove using Advanced Find in the command bar, then click Find and Remove all.

    pastedimage1600409282956v1.png

    pastedimage1600409302283v2.png

    pastedimage1600409352857v3.png

    If you want to use workflow or flow to achieve, then this will be more troublesome.

    First of all, Lead and Marketing List have an N:N relationship, and they are connected through the listmember entity.

    pastedimage1600409551774v4.png

    If you want to remove all the leads form the current Marketing List, then we need to search out the listmember records related to the current Marketing List record first, and then delete these listmember records.

    Workflow does not have the function of searching records, we will have to use Power Automate (flow) to achieve it.

    So, the easiest way to quickly remove all members is by Remove using Advanced Find within D365.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Workflow to clear related records?

    Hi,

    As suggested you can achieve your requirement with Manage Member ->Remove using Advanced find ribbon button.

    CQ13.PNG

    This will work if Marketing list type is Static.

    Please mark my answer verified if i were helpful

  • Suggested answer
    Pankaj Gogoi Profile Picture
    Pankaj Gogoi 3,177 on at
    RE: Workflow to clear related records?

    Hi,

    I think you can use the Manage Members ribbon button on Marketing list if the list is not locked.

    https://docs.microsoft.com/en-us/dynamics365/sales-enterprise/create-marketing-list-using-app-marketing-sales

    Best Regards

    PG

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans