Since CRM Plugins and Workflows are deployed on web servers after the development reaches the release stage , it is usually very helpful to include tracing in your code in profusion, not only in error cases, at least when you are putting to the test new developments .
CRM 2011-2013 allows you to include tracing galore:
How to use Tracing in CRM 2011-2013 Plugins and Workflows
Phase 1: use the GetExtension() method from the "context" at your plugin-workflow:
Since this is a generic C# Dot.Net method, use the ITracingService interface to get the tracing service from the context.
Phase 2: Send the ITracingService to any method where you intend to log information using tracing:
For example:
Phase 3: inside the plugin's methods, call the ITracingService's Trace() method to send messages to the tracing:
In case of error, CRM will display an alert showing the tracing:
That's all...Enjoy Dynamics CRM
by Carmel Schvartzman
כתב: כרמל שוורצמן