Error: Two Minute Plug-In Timeout

After you analyze/tag and validate your duplicate Leads/Contacts/Accounts in your CRM, you may run into the timeout error.

2 minute plug-in timeout error
2 minute plug-in timeout error

What's causing this?

Microsoft imposes the 2 minute plug-in timeout to make sure ISV code behaves nicely in a CRM deployment that may be shared with 100s of customers.

What happens when I click the "AutoMerge" button?

When you click the “AutoMerge” button, three things happen:

  1. For each field listed in the “Field Preservation List AM-Configuration” record:  If a field is empty (null) on the winner record (the winner holding a rank of #1) and the same field is non-empty on the loser (Rank >= 2), then the value from the loser is copied into the winner.
    • Similar field preservation occurs according the other relevant AM-Config records: Address Block [1,2] List; Append Field List
  2. Next, a link to the winner is populated on the loser duplicate record which will be deactivated in the following merge step.
  3. The loser is merged into the winner.
    • This re-directs any record pointed to the loser to now point to the winner. This includes all 1:N, N:1 and N:N relationships.
    • This operation cascades ownership changes down to 1:N child records. According to your cascading rules.
Screenshot AutoMerge Configuration Records
AdvancedFind of AutoMerge Configuration Records

Troubleshooting the Two Minute Timeout by Disabling the SDK Message Processing Steps

Take a look at your “SDK Message Processing Steps” to see what other plug-ins are configured. 

  1. Open your “Default Solution.”

  2. Click on the “SDK Message Processing Steps” on the left navigation pane.

  3. Sort the resulting list by “Parent Object Type Code.”

  4. Scroll down to the entity you are interested in (e.g. Contact.)

  5. Look at all the “SDK Message Processing Steps” for your entity that have the status of “Update” in the “SDK Message” column.

Here, you will see the “GenbilMerger.*” steps that make AutoMerge work. Look for steps from another Event Handler.

At this point, you can disable whichever step you think may be causing the timeout. Select it from the list and click “Deactivate” at the top. Then, attempt the “AutoMerge” on the same set again to see if it processes faster.

Screenshot Sdk Message Processing Steps
Screenshot Sdk Message Processing Steps (sorted)

If disabling SDK Message Processing Steps didn't work, you may have a pair of duplicates where a winner record has many associated loser records, which may be slowing down the process of re-pointing the loser records to the winner record.

During the merge operation, the CRM platform may be cascading a lot of ownership changes down to child records. If there are 100s or 1000s of those child records, it can certainly timeout.

Activity type records such as email-messages or phone-call records are a common cause. They may accumulate into the thousands for a large customer after years of CRM use.

If your cascading rules are still the default ones that come out of the box, it may be time to review them.

Check out our other resources!

Copyright © 2020 AutoMerge