Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Plugin not fired during field bulk-update

Posted on by Microsoft Employee

Team,

I have a Dynamics 365 Solution where on a custom entity a plugin is fired when the Status Reason of the record is Completed.

Status Reason is field on the form, which could be manually changed by the User during the business.

The problem I am facing is, when I bulk-update few records and change the field, the plugin is not fired.

It is strangely fired only when the value is modified from the form. Also, I have tried with On-Demand workflows. That doesn't work either.

Kindly help!

*This post is locked for comments

  • Shidin Haridas Profile Picture
    Shidin Haridas 3,497 on at
    RE: Plugin not fired during field bulk-update

    Just realized, do you have any context.depth checks on your plugin?

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Plugin not fired during field bulk-update

    How do you know the plugin is not firing?In addition make sure during bulk update you are changing the status reason field.

  • Suggested answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Plugin not fired during field bulk-update

    Hi Ankush,

    Did you enable tracing or try thrown exception just after the Execute method beginning, just to check whether the plugin is not even triggering or it's triggering but not meeting any conditions?

    Here, is the similar article which user is facing the similar issue at the time of Bulk Delete.

    It was due to the condition:

    if (context.Depth == 1) // replace by context.Depth > 1
    {

    }

    Check this - https://stackoverflow.com/questions/23404391/bulk-delete-does-not-fire-the-plugin-in-crm-dynamics

    Hope it helps.

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.

    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

  • Suggested answer
    Shidin Haridas Profile Picture
    Shidin Haridas 3,497 on at
    RE: Plugin not fired during field bulk-update

    Can you try registering your plugin on the SetState & SetStateDynamicEntity messages as well and try the bulk update?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin not fired during field bulk-update

    I'm sorry Temmy, it couldn't be released. But is there any possibility for CRM to behave in such way?

  • Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: Plugin not fired during field bulk-update

    Share your code, so we can check on it?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin not fired during field bulk-update

    Experts,

    Need your assistance on this. Thanks!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin not fired during field bulk-update

    Hi David,

    The plugin is on Update where the check is handled in the preliminary part of the code.

    However, what you mentioned about the message is accurate.

    The audit doesn't show much apart the update of the Status Reason.

    PS - The plugin is utilized to create a new record of another entity for the triggering record based xyz other criteria.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Plugin not fired during field bulk-update

    Which message is the plugin registered on - SetState or Update ? Either message could be used to change the statecode and statuscode; from a plugin perspective, I'd expect it to always run if registered on the Update step.

    If that doesn't help, it's worth checking the audit to see if there's a difference in the audit information for each of the scenarios

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