Dynamics CRM 2011 · Plugin · Workaround

CRM 2011: Filtering Attributes (Plugin) and Early Bound Code

Setting Filtering Attributes on Plugin Step is one of the things that is often overlooked. That is a shame because using Filtering Attributes can improve plugin performance significantly; and not to mention simplify execution order if you have complex chains of plugins.

According to MSDN article here, Filtering Attributes is

A list of entity attributes that, when changed, cause the plug-in to execute. A value of null causes the plug-in to execute if any of the attributes change.

Early Bound Code
I am very much in the favor of using early bound code as it provides compile-time checking, linq, and other perks. However, what we found out is that updating retrieved record using early bound code organisation context will bypass filtering attributes as it submits the record’s entire object graph back to CRM. CRM therefore assumes that all the attributes are being updated and thus effectively rendering filtering attributes useless.

Cheers – Sy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s