Apparently the hotfix installation combined with client cache files caused the error. Microsoft was able to provide me the following solution:
It may be related to the presence of stale client cache files when the customer compiled their application. The workaround is to delete the customer model, delete the client cache files, re-import and compile.
So here are 2 options for you to correct behavior. The first one is preferred but would take longer time. Both require to setup a clean environment with MS models only (here it’s called BaselineModelStore). Please make sure that there is a healthy Model DB in same SQL instance in order to copy from and overwrite the corrupted object properties in affected DB. Remember to correct DB and objects name references in SQL script accordingly.
Please not this is just a workaround. “Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This mail message assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures.
1. Model store import
a. Export any non-MS models to model files
b. Export model store file from BaseLineModelStore
c. Stop AOS and delete client side cache files
d. Import model store file from c.
e. Import model files from a.
2. Direct SQL patch
a. Find offending element (i.e. xxxxMap)
b. Stop AOS and delete client side cache files
c. Run attached SQL query to update the metadata (replace corrupted metadata from good one on BaselineModelStore)
Here is the SQL script:
-- Assumption: Script works against dev model store
-- Assumption: Clean baseline model store is named: axdbdev_model_id_baseline (can be replaced by own naming)
-- Check existence affect object in dev environment
use MicrosoftDynamicsAX
SELECT m.ElementType, m.Name, m.AxId, md.LayerId, manifest.DisplayName, md.Properties as Metadata
FROM [dbo].ModelElement AS m
INNER JOIN [dbo].ModelElementData AS md
ON m.ElementHandle = md.ElementHandle
INNER JOIN [dbo].ModelManifest AS manifest
ON md.ModelId = manifest.ModelId
AND m.ElementType = 44 AND m.Name = 'DirPartyLookupGridView'
-- Check existence affect object in baseline environment
use MicrosoftDynamicsAXBaseline
SELECT m.ElementType, m.Name, m.AxId, md.LayerId, manifest.DisplayName, md.Properties as Metadata
FROM MicrosoftDynamicsAXBaseline.[dbo].ModelElement AS m
INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelElementData AS md
ON m.ElementHandle = md.ElementHandle
INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelManifest AS manifest
ON md.ModelId = manifest.ModelId
AND m.ElementType = 44 AND m.Name = 'DirPartyLookupGridView'
-- Replace corrupted metadata on dev environment from baseline environment
use MicrosoftDynamicsAX
Update md Set md.Properties = md_base.Properties
FROM [dbo].ModelElement AS m
INNER JOIN [dbo].ModelElementData AS md
ON m.ElementHandle = md.ElementHandle
INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelElement AS m_base
ON m.ElementType = m_base.ElementType AND m.Name = m_base.Name
INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelElementData AS md_base
ON m_base.ElementHandle = md_base.ElementHandle
AND m_base.ElementType = 44 AND m_base.Name = 'DirPartyLookupGridView' AND md_base.LayerId = 0