Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Writing plugin to remove certain contacts from a marketing list

Posted on by Microsoft Employee

Hello everyone, 

I've created a plugin that will add several contacts to a marketing list, and will also remove some contacts from the marketing list.

Adding contacts works fine, but removing gives me the error: "The specified item is not a member of the specified List". 

So obviously I double checked my id's, and I'm definitely passing in the list id and the entity id correctly.

This is my code:

            var req3 = new RemoveMemberListRequest()
            {
                ListId = new Guid("4675e996-f98d-ea11-a811-000d3a21015b"),
                EntityId = new Guid("a5cd2cef-1570-ea11-a811-000d3a2101c9")
            };

            Service.Execute(req3);

The List Id is the correct id of a marketing list, and the EntityId is an id of an existing contact, which is a member of said marketing list. 

So what could be wrong here? 

  • Suggested answer
    RE: Writing plugin to remove certain contacts from a marketing list

    Hello Steven,

    Hope you are well.

    First, check if your assemblies are updated to the latest version, might be a problem that was since fixed.
    It might also be that this marketing list in particular has duplicate records associated with it, I found this error message associated with these type of scenarios. See if this is the case and also create a new marketing list with only one contact and see if the error still reproduces.

    Hope this helps

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans