Reputation: 1643
I have a Dynamics 365 CE online instance. I'm debugging a plug-in. I can find plug-in trace log Entities that come from the code I'm interested in. How can I determine the Entity instance that triggered the plug-in to fire? I.e. I have a plug-in registered against entity Foo. I can see the trace log entry from the run I'm interested in. How do I find which Foo instance triggered the run?
Upvotes: 1
Views: 945
Reputation: 22836
I recommend you to look at system jobs entries, we can find the context like owner of the event (who was interacting during that time) and regarding record (which entity record was in scope of this event) as entity reference captured in each entry.
Though when debugging - the Plugin Trace log matters a lot for detailed trace lines to see what went wrong, this log entity cannot be customized to add more entity reference like system job doing it OOB way.
System jobs will capture all the events happening like OS event logs and will give more context across the platform including various jobs like Plugin, Workflow, Rollup job, etc
Upvotes: 0
Reputation: 186
To be specific, yes, you ( the plugin developer ) are required to traceout the content you are interested in for the plugin trace log. For clarification though, it will appear in the plugin-tracelog in the message block field.
I would encourage you to go to https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas and post it. we are always watching that.
thanks
Upvotes: 1
Reputation: 5531
I guess you wish to know which foo record has triggered the plugin.
You can add record id as tracing and you can easily see this under Exception details.
By default D365 CE only gives info on which entity and what message plugin fired
Upvotes: 1