Ondrej Svejdar
Ondrej Svejdar

Reputation: 22054

How to enable plugin trace logs programatically / via SDK

I know how to enable plugin trace logs via UI - i.e.

UI of CRM - System settings/Customizations/Plug-in and custom workflow activity tracking

Is there a way how to do it programatically (via SDK call) ?

Upvotes: 0

Views: 540

Answers (1)

Guido Preite
Guido Preite

Reputation: 15128

Yes, it is possible, Plugin Trace Viewer for XrmToolBox has the option to change the logging level.

From the source code, it should be an update to the organization entity, field plugintracelogsetting (optionset with the following options: Off = 0, Exception = 1, All = 2)

The organization entity should have only a single record, so you do a RetrieveMultiple and check the first result in order to get the Id for the entity update.  

Upvotes: 4

Related Questions