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 365 | Integration, Dataverse...
Suggested Answer

Finding all Synchronous processes on an Entity (specifically msdyn_workorder)

(0) ShareShare
ReportReport
Posted on by

We have a plugin that runs on fullfill of an order to create a work order.

This is a pretty straight forward plugin - create work order .. then add all order products to a bulk request and create work order products.

The problem is, the create request for the work order takes upwards of 30 seconds to run now.  And I can't find the culprit .. I've gone through all plugins and workflows, all are asynchronous.  

Then ... work order products sometimes times out too .. that takes forever than a day also to create.  This is the same, I've no synchronous processes that I can find running.

So how can I debug this?  I've added timestamp steps to the entire plugin .. so when it fails I can see how long each step takes in the system job message.

Help! I don't know where to start here .. Microsoft is saying I have to rewrite the plugin .. but it's straight forward .. a few lookups to get some lookups from the account and other entities, assigning the field values .. and creating the record.

I have the same question (0)
  • Linn Zaw Win Profile Picture
    3,407 on at

    The simplest way to find the synchronous processes on an Entity is to click on Show Dependencies and check the processes one after another.

    pastedimage1593587248673v1.png

    Does your plugin need to be sync? If it is not, can you change it to async and see if it is taking that 30 seconds?
    What is the outcome of the timestamp steps to the entire plugin? Did you identify any particular big gap?

  • Filipe Relvas Profile Picture
    on at

    Hi,

    As pointed out by Linn, I would try to evaluate in which particular function this is taking a lot of time. Is it during the Work Order creation or the Work Order Products?

    It is possible that a few other Plugins are registered for the Work Order and Work Order Products creation which leads to an increase in time proportional to the number of records involved.

    While some operations might be straight forward through code, they might take sometime when performed the platform either due to business logic or the complexity of the SQL queries involved.

    Please let us know about any additional info so we can assist you further!

  • graflunds Profile Picture
    on at

    i will look at the show dependencies .. the plugin is an async post operation plugin already (runs on fullfill of sales order) .. but still online has a 2 minute timeout limit ... yesterday was bad out of some 200 executions 25 of them failed (end of month is always fun for new install work orders as sales reps are always closing and activating their quotes for commissions).  

    i am working on converting the plugin to a workflow activity ... this seems to be the loophole for the 2  minute rule .. but i want to find out the reason why the create work order step still takes 30 seconds+ to execute.

  • Linn Zaw Win Profile Picture
    3,407 on at

    Please try automated flow instead of a workflow activity if it can be achievable in Power Automate.

    If you want to troubleshoot why creating work order step still takes 30 seconds+ to execute, you may copy your plugin code, create a console application and replace the variables with hardcoded values and then, you will have better visibility and able to debug.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    It is not a good practice to use executemultiple request in plugin as this takes time and plugin has 2 minutes timeout limitation.

    I think culprit might be OOB plugin not custom plugin which you have create.

    Also, if possible split your plugin code to 2 different plugins.

    If found helpful, Please mark my answer verified.

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 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 80

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans