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.