Search code examples
pluginsdynamics-crm

Will adding all attrbiutes to PreImage/PostImage to plugin step have impact on performance?


When registering plugin images and selecting all attributes to the image, the Plugin Registration Tool says that

"This plug-in will execute on all changes to the attributes associated to this message type!. This can create performance issues for your application and it is recommended that you filter your step registration to trigger on only the attributes you care about".

I set filtering attributes for the step. So will setting filtering attributes save me from what that caution says?


Solution

  • For Example if you have Plugin on Update of Contact and filtering attribute is set to All, It will run on any field change on contact and this will definitely cause performance issue.

    Now when you have filtering attribute set to only few fields for example fist name, last name and so on it will restrict to fire your plugin only on those field.

    You can get all the attributes in pre image and post image but best case it to select only those attributes you need in your transaction.

    Adding all fields in Pre and Post image will not add much burden/impact on your performance, but it will definitely add performance issue if your filtering attribute has all the fields selected.