Posts

Showing posts from 2014

Import model store error AX 2012 R2 CU7

For model databases that have been upgraded to CU7 there is a possibility that they might be missing the following tabels. - ModelOperatioin - ModelOperationHistory - ModelCustomLayerConflicts The result will be that following error in the eventlog in the sql environment when applying the temp schema using axutil. AXUtil operation failed : ImportStore Cannot find the object 'ModelOperation', because it does not exist or you do not have permission. Cannot find the object 'ModelOperationHistory', because it does not exist or you do not have permission. Cannot find the object 'ModelCustomLayerConflicts', because it does not exist or you do not have permission. When applying the the temp schema with the powershell command  Import-AXModelStore  the output in the console with be a flush of red SQL commands with DROP ******. Solution: Find a model database for a CU7 environment with the tabels. Use SQL manager to generate create scripts  and run them

Table array field iteration

An example on how to iterate a table field that is an array static void Job10(Args _args) { Dicttype dicttype; counter i; str test; ; test = "Client"; dicttype = new dicttype(132);//132 here is the id of edt dimension for (i=1;i<=dicttype.arraySize();i++) { if ( dicttype.label(i) == test) { break; } } print i; pause; }