I have this code :
foreach (PluginAssembly tempPluginAssembly in pluginAssemblyList)
{
if (!tempPluginAssembly.Name.StartsWith("Microsoft.Crm"))
{
List<PluginType> pluginList;
pluginList = xrmContext.PluginTypeSet.Where(Plugin => Plugin.PluginAssemblyId.Id == tempPluginAssembly.Id).ToList();
foreach (PluginType plugin in pluginList)
{
if (plugin.IsWorkflowActivity == false)
{
writer.WriteLine(new string[] { tempPluginAssembly.Name, tempPluginAssembly.Description, plugin.Name, String.Empty });
++pluginCount;
}
}
}
}
Basically what it does is retrieve the assemblylist from my crm environment and filter the microsoft assemblies. Then, I retrieve every PluginType object contained in those assemblies and I log the information somewhere. But this isn’t enough, I want to retrieve the steps that are contained in each of the PluginType objects.
How can I manage that? Is there a class I don’t know about or an Attribute in the PluginType objects that I don’t know about?
You need to reference the
SdkMessageProcessingStepentity to retrieve plugin steps. You can see the join in the query in the code below.