2016-07-28 87 views

回答

2

要获得所有的步骤:

var step = xrmServiceContext.SdkMessageSet.FirstOrDefault(step => step.Name == "foobar"); 

要得到所有的插件组件:

var plugin = xrmServiceContext.PluginAssemblySet.FirstOrDefault(p => p.Name == "foobar"); 

一旦你得到的GUID,你会删除它们像任何其他实体:

service.Delete(PluginAssembly.EntityLogicalName, plugin.Id); 

如果有任何依赖关系,您需要遍历依赖项列表并首先删除它们。使用RetrieveDependentComponentsRequest来获取所有依赖项的列表。