Skip to main content

Notifications

Announcements

No record found.

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

Plugin is executing only in debug mode Dynamics 365

Posted on by 90

I have a Plugin on the create event of an entity, that delete records from a Field If another record has the same date (count = 1). When i start debugging the plugin is working and delete the duplicate record. Without debugging the plugin does not see duplicate record (count = 0) and does not execute anything. 

I enabled tracing and checked system jobs and no errors appeared.

CRM Version: Dynamics 365 V9.1 Online

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin is executing only in debug mode Dynamics 365

    Duplicate record counting condition is not working.

    You can use preimage for your entity. Query on preimage data according to newly created data.

    If you find any record delete the record.

  • Suggested answer
    Abhishek_Sinha Profile Picture
    Abhishek_Sinha 665 on at
    RE: Plugin is executing only in debug mode Dynamics 365

    I also faced same issue, so put tracing in the plugin and check for status change. When you are debugging then status of record can change and you will get correct result. While tracing you will get exact status. In my scenario plugin was in completed status on post create through Five 9 and while debugging. But while actual tracing it was in open state.

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: Plugin is executing only in debug mode Dynamics 365

    I think.. last option to try is remove / un-register plugin and register plugin again.

  • CSafwat Profile Picture
    CSafwat 90 on at
    RE: Plugin is executing only in debug mode Dynamics 365

    No, There is no error appeared in Plugin Trace log.

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: Plugin is executing only in debug mode Dynamics 365

    is there any error logs in Plugin trace?

  • CSafwat Profile Picture
    CSafwat 90 on at
    RE: Plugin is executing only in debug mode Dynamics 365

    The plugin execution event is PostOperation and still not working!

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: Plugin is executing only in debug mode Dynamics 365

    Check plugin execution event.. it might be you are executing plugin on Pre-event or pre-validation event.. change it to post event and try..

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