web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Record created through plugin doesn't trigger onCreate plugin

(0) ShareShare
ReportReport
Posted on by 422

I create and update a bunch of records with ExecuteMultipleRequest from the sdk but the created records have a oncreate step in a plugin. The plugin doesn't get executed when created that way, but it works if I create manually the record. Any idea how to fix this?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Felippe Profile Picture
    796 on at

    Maybe your plug-in are running and getting exceptions, or the Target image when you are creating manually is different from the ExecuteMultipleRequest records.

    If you can debug, check the Fault message after the ExecuteMultipleRequest or debug the plugin directly to see if at least  it fires.

    Use the properties : ContinueOnErrors =true and ReturnResponses = true to help you to find the issue.

    See msdn.microsoft.com/.../JJ863631.aspx

    "

    In general, ExecuteMultipleRequest behaves the same as if you executed each message request in the input request collection separately, except with better performance. Use of the CallerId parameter of the service proxy is honored and will apply to the execution of every message in the input request collection. Plug-ins and workflow activities are executed as you would expect for each message processed.

    Custom code in the form of plug-ins and custom workflow activities can even execute ExecuteMultipleRequest. However, there are a few key points to keep in mind. An exception thrown by a synchronous registered plug-in is returned in the response collection item Fault parameter. If a plug-in executes within a database transaction, the plug-in executes ExecuteMultipleRequest, and a transaction rollback is initiated, the rollback includes any data changes resulting from requests executed by ExecuteMultipleRequest."

  • Verified answer
    ARIFNIIT Profile Picture
    1,391 on at

    ExecuteMultipleRequest is an Asynch message. so check error details in response.

    Set two property ContinueOnError = true, ReturnResponses = true in ExecuteMultipleRequest

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans