Set Filter Attributes – Update Plugin – Dynamics CRM 2013 Upgrade Gotcha

Recently I upgraded one of my virtual machine with Dynamics CRM 2011 to Dynamics CRM 2013. That instance contains my old solutions from previous learning and testing. One of the solution contains several plugins to be triggered on Update request.

With the new auto-save feature in Dynamics CRM 2013, any modification to the form will be automatically saved every 30 seconds or when the user navigated away from the from (click other records or navigate to different page). 

There was an unexpected performance issue every a couple seconds (30 seconds to be exact) when I was working with the new CRM 2013 form. After I traced the source of the problem, it was coming from the plugin that triggered every 30 seconds by the auto-save. The new auto-save functionality will trigger the plugin because I was not filtered the plugin on the required fields (attributes). This problem never happened on CRM 2011 as the update request will only be triggered through “Save” button with manual user interaction.

I think it is a best practice to filter the update plugin to only be triggered on the related attributes, to achieve that:

Method 1: through Plugin Registration Tool, on the step registered:

Image

 

Method 2: through Developer Toolkit in Visual Studio, on the step registered:

Image

 

This would be a lesson learn in future to do the due-diligence in selecting the correct filter attributes for the plugin.

 

Don’t Try This At Home – Adding CRMAppPool User as Dynamics CRM User

No matter how lazy we are to add new user, especially during “Proof of Concept” or Testing period.

Do not add CRMAppPool User as Dynamics CRM SystemUser. This will breaks the system, moreover in multi-tenant environment – Considering the amount of time required in repairing might be bad in Multi-Tenancy environment in regards to the SLA, all of your CRM Services will break and show the following error:

Missing Dynamics CRM Security Role” – Access to Microsoft Dynamics CRM has not been fully configured for this user. The user needs at least one security role before you can continue.

Image

Microsoft stated: “This behavior is by design. Making the account that is running the CRMAppPool into a Microsoft Dynamics CRM user is not supported.” in this KB article: http://support.microsoft.com/kb/2500917

I did that, so what I need to do?

1. Create new AD User to replace the corrupted one.

2. Open Control Panel > Programs and Features

Image

3. Open Microsoft Dynamics CRM Server 2013

Image

4. Select Repair

Image

5. Update the following user configuration with the new AD user 

Image

6. Continue the whole repair process (“Next” button spam!).

7. Test to access your CRM instances back.

Image

Lesson Learned

Before start working with Dynamics CRM Server, read through the Implementation Guide carefully: http://www.microsoft.com/en-au/download/details.aspx?id=40322 (On CRMIGv6_Planning.docx, Section: Microsoft Dynamics CRM Services and IIS Application Pool Identity Permissions).