You might face the situation where the creation of an alternate key does not seem to do its job. It remains in the pending state:

2017-10-12 13_48_54-Solution_ Default Solution - Microsoft Dynamics 365
Alternate key remains in the pending status

When trying to reactive the key:

2017-10-12 13_52_28-Solution_ Default Solution - Microsoft Dynamics 365
Reactive pending key

The system throws an exception saying “Reactive entity key is only supported for failed job”:

2017-10-12 13_53_11-Solution_ Default Solution - Microsoft Dynamics 365
Reactivate entity key is only supported for failed job

So, let’s take a look at the linked system job:

2017-10-12 13_59_18-Solution_ Default Solution - Microsoft Dynamics 365

We have the very explanatory message saying “Exception: Event failed due to an exception”:

2017-10-12 14_00_17-System Job_ Create index for External Id for entity Entity Status - Microsoft Dy

So we are only allowed to reactivate a key for a failed job, right? So a system job with an exception is not a failed job? Seems odd to me.

Let’s try to remove these “exception” system jobs:

2017-10-12 13_46_27-Wealth_ Dashboards - Microsoft Dynamics 365

Next, we are able to reactive the key(s) again:

2017-10-12 14_27_06-Solution_ Default Solution - Microsoft Dynamics 365

Give it a few seconds, and your alternate key is Active:

2017-10-12 14_28_50-Solution_ Default Solution - Microsoft Dynamics 365

Conclusion

When an entity key remains in the pending state, check the according system job and delete it if it has an exception. After deleting the system job you are able to reactive the entity key. Another mystery resolved!

One thought on “Reactivate entity key is only supported for failed job”

Leave a Reply