TracingService. 码农debug的救星

我们写的plugin或者action都是直接以dll的形式写入到D365中. 这给debug带来了困难.

我们可以使用tracingService回传一些有用的数据/信息显示在plugin Trace Log中.

 

我们只用在头部引用

using Microsoft.Xrm.Sdk;

并且在class中声明interface接口

然后我们就可以调用tracingService.Trace(""); 来回传到CRM中我们需要的值

ITracingService tracingService
tracingService.Trace("Hello World!");

 

posted @ 2020-03-22 14:01  TheMiao  阅读(433)  评论(0编辑  收藏  举报