Well, I thought this information would be helpful to all of us during pre-synchronization upgrade job.
If you add a new unique index to a table, or change an existing one, it will cause problems for users when they upgrade to a new version of Microsoft Dynamics AX. This will cause a best practice error.
This error can be fixed by implementing an upgrade script called AllowDupTablenameIndexname, or DeleteDupTablenameIndexname as a pre-synchronization upgrade job.
For example, if the new unique index on MyTable is called NewUniqueIndex, the script should be called AllowDupMyTableNewUniqueIndex or DeleteDupMyTableNewUniqueIndex.
Use this to temporarily disable the unique index. When you have removed conflicting fields, you need to run an upgrade script to re-enable the unique index.
“AllowDup” scripts should contain the following code.
DictIndex dictIndex = new DictIndex(
“DeleteDup” scriptsUse this to delete all conflicting fields.
“DeleteDup” scripts should contain the following code.