Search code examples
pluginsdynamics-crmdynamics-crm-4

Getting a list of filtering attributes for a CRM Plugin (already installed)


I have Dynamics CRM 4.0 installed and wrote a plugin, registered it, and setup a "step" that included a few filtering attributes. 2 questions:

  1. How can I get a list of filtering attributes that are configured for my plugin? (from within the plugin itself)
  2. How can I get a list of those filtering attributes that are actually on the current form being used? (also within the plugin itself)

Solution

  • If you want to get every property in an image that you've sent to a plugin you can iterate through the property bag after setting it to a dynamic entity. This will include every field on the entity.

    DynamicEntity postEntity = (DynamicEntity)context.PostEntityImages["entityimage"]
    
    foreach (Property p in postEntity.Properties)
    {
        // Do something with my property
    }