Shane

Shane Grimes' Blog

MDS 2012 Business Rules 208: A database error has occurred

There is an issue with MDS 2012 and business rules with a combination of "must be unique" attributes. If you do not list the attributes in the same order that they were created you will get a generic error message when trying to revalidate your data.

The work around for this is to recreate the “must be unique” combination of attributes in the same order as the attributes shown in the leaf attributes list. The screenshots below provide an example of the issue and solution.

In the first screenshot below we have a unique constraint containing Customer Type and Order Type. In this scenario we wanted to add Brand to the uniqueness constraint.

imageclip_image002[17]

We can drag and drop “Brand” from our entity specific attribute list onto our combination, save, and publish the updated business rules without problem.

Once the new rules have been published a question mark will appears next to all rows of data for the entity that the business rule covers.

clip_image002[6]

When we click on apply rules to re-run the business rules and validate the data we get the following error message.

clip_image002[12]

clip_image002[8]

As mentioned above the work around is to recreate the unique constraint with the attributes in the same order as they appear in the Entity Specific attribute lists.

In our example that means recreating the unique constraint so that Brand appears above Customer Type and Order Type.

clip_image002[20]

Once the re-ordered rule has been published, applying it to the entity will work without error once more.

clip_image002[12]

Loading