Skip to main content

Notifications

Announcements

No record found.

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

AddMemberListRequest failing only within custom plugin triggered by an Odata rest api call

Posted on by 20

I have a custom plugin which is triggered when a contact gets added to a navigation property of another custom entity.  Within this plugin I check a few conditions and then execute an AddMemberListRequest for the contact.

This plugin works when a contact gets added via the Dynamics 365 web interface AND when a contact gets added via the .net Framework Microsoft.Xrm.Sdk.IOrganizationService.

However, when I add a contact via the rest api (Odata), the plugin is triggered but throws: 

Microsoft.Xrm.Sdk.InvalidPluginExecutionException: OrganizationServiceFault System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The 'Create' method does not support entities of type 'listmember'. (Fault Detail is equal to Exception details:
ErrorCode: 0x80040800
Message: The 'Create' method does not support entities of type 'listmember'.
TimeStamp: 2020-07-08T16:40:40.1979569Z
--
). ---> Microsoft.Xrm.Sdk.InvalidPluginExecutionException: OrganizationServiceFault System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The 'Create' method does not support entities of type 'listmember'. (Fault Detail is equal to Exception details:
ErrorCode: 0x80040800
Message: The 'Create' method does not support entities of type 'listmember'.
TimeStamp: 2020-07-08T16:40:40.1979569Z
--
).
at Microsoft.Dynamics.Marketing.Plugins.MarketingPluginBase.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass2_1.<Execute>b__0()

Just to reiterate, I am not using a Create method in a listmember, I am executing an AddMemberListRequest.  The same exact plugin code runs for each trigger but only throws the exception when triggered via the rest api.

EDIT: One more detail is that the plugin also works when a single rest api call is made associating a contact with the other custom entity.  The scenario in which the plugin does not work is that it is triggered via an Odata batch request

I'm not sure if this is a bug but clearly there is something different about the context under which the plugin runs when triggered via rest api.  I dont really know how to submit a bug report if this is, in fact, a bug.

Does anyone have any suggestions?

Thanks

I'm running version 1612 (9.0.15.9) on-premises.

I have tried remote debugging but cant see any differences while doing so since I am not able to step into any of the relevant code.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: AddMemberListRequest failing only within custom plugin triggered by an Odata rest api call

    You can start here - support.microsoft.com/.../productselection

  • Majellin Profile Picture
    Majellin 20 on at
    RE: AddMemberListRequest failing only within custom plugin triggered by an Odata rest api call

    Thanks for the suggestion, do you have a link or something to where I should open the ticket?  I'm not really sure where to do that.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: AddMemberListRequest failing only within custom plugin triggered by an Odata rest api call

    Hello,

    My suggestion - open a ticket with Microsoft and ask them to fix your issue. It looks for me this is a platform thing and you can't do anything with it.

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