Tracing allows you to gather detailed information about the execution of a formula or formulae within Dynamics CRM. This trace information allows you to troubleshoot & debug any problems you have with your formulae. BPA supports three different types of tracing,

  •  System Wide
  •  Individual Formula
  •  Runtime

The system wide & individual formula tracing consists of writing information to an entity within Dynamics CRM called N52 Trace. These two types of tracing must be manually enabled. The trace data can be viewed by running an advanced find on the N52 Trace entity & then opening up the individual records to see the logging details. You can find more details about how to do this under the topic Finding Trace Information.

System Logging

This is enabled from the N52 Configuration entity. The screenshot below shows the default value for the tracing level which is off. The following are the various options & their meaning.

  •  Off - No tracing information is written to the N52 Trace entity.
  •  Information - Trace information is written to the N52 Trace entity for every formula execution that occurs in the system.
  •  Information (Show Exception Details) - This provides additional details when you are working with nested exceptions. It will not create a record in the N52 Trace entity. 
  •  Information (Disable Platform Updates) - Same as above except that none of the following formula types will save their values to the system. Save - To Current Record, Save - To Parent, Save - To Children.
  •  Error - Trace information is written to the N52 Trace entity only when an error occurs in the system. This level is really only used when the formula is registered to run in the Pre-Validation stage. The reason for this is that whenever an plugin Exception is thrown in CRM for any other steps it will rollback the transaction & hence the trace records will also be rolled back. So for any true errors in a formula we just use the runtime logging to capture trace information which you can see below.

Formula Logging

This type of tracing enables tracing for a single formula. This is very useful if you know a particular formula has a problem and you need to get detailed information. This can be set by opening up the formula & navigating down to the end of the form where you will see a picklist showing you the various options.


Runtime Logging

This type of tracing is always enabled within BPA and it can be accessed by an end user whenever an error occurs. The user can access this tracing information by clicking on the "Download Log File" button as shown in the screenshot below & then opening the file to view the detailed trace information.

Note 1 : 

After you perform a logging session always turn logging off & perform a bulk delete of any North52 Trace records that have been created.

Note 2 : 

If needed you may need to turn on the tracing that comes with Dynamics CRM 2011. This can be enabled by using this Dynamics CRM tracing tool.