The Status Reason field in Dynamics CRM is a special field which allows you to provide reasons for the status of a particular record. For example, an Article can have a Status of “Active” and a Status Reason of “Awaiting Review”, “Approved”, “Published” etc. Likewise, an Article can have a Status of “Inactive” and a Status Reason of “Expired” or “Deleted”. But what happens if you configure your Status Reasons incorrectly?
I had recently made a mistake while configuring the Status Reason field such that a user could set an Article to Active – Deleted, which was not the desired functionality. The “Deleted” status reason should instead be linked to the “Inactive” state.
The CRM implementation also enforced strict rules so that the “Deleted” status reason must have an ordinal value of 213,940,003. Let’s see what happens when I try to simply re-create the “Deleted” status reason against the “Inactive” state.
If I try to delete and re-create the “Deleted” status reason, the CRM platform automatically assigns it the next available ordinal value of 213,940,006 and it appears that I cannot change this value.
Thankfully there is a way to change this value without any nasty database hacks.
Firstly, remove the “Deleted” status reason, save your changes and publish customizations. Next, add the “Deleted” status reason to the list of “Inactive” status’ as we previously attempted.
On the Add List Value screen, press F12 to launch Internet Explorer Developer tools.
Make sure the HTML tab is selected and then select the cursor icon.
Back on the Add List Value screen, hover over the Value textbox so it appears with a blue outline and then click the mouse.
Back on the Internet Explorer Developer Tools screen, on the right-hand pane, select Attributes and then select the disabled attribute. Press the delete button to remove this attribute.
The Value field will now be editable. Change the value from 213,940,006 to 213,940,003 and then click on OK.
Save the changes to the Status Reason field and publish customisations. The “Deleted” status reason will now be available to select when making records inactive.