16.03.2010, 21:05 | #1 |
Участник
|
emeadaxsupport: Identifying damaged Table objects in the AOT MetaData
Источник: http://blogs.msdn.com/emeadaxsupport...-metadata.aspx
============== It happens very seldom, but sometimes the AOT MetaData is getting damaged, especially for Table objects. Indications of such an element “corruption” can be that you have one explicit Table in the AOT and every time you access this object either the Dynamics AX Client or the Dynamics AX Application Object Server crashes. But the issue can also start earlier when you expand the Data Dictionary node of the AOT. If you have no idea what Table could be affected the following X++ Job can help you finding out, by walking through the UtilIdElements Table touching each individual Table object: X++: static void findDamagedTableObjects(Args _args) { UtilIdElements util; common tabBuff; DictTable dt; ; //Look at all Tables while select util where util.recordType == utilElementType::Table { /* Print out the name; the last element showing up here is most likely the object causing issues... */ print strFmt('Layer: %1 | Table Id: %2 | Table Name: %3', util.utilLevel, util.id, util.name); //This will eventually cause the Client or AOS to crash dt = new DictTable(tablename2id(util.name)); tabBuff = dt.makeRecord(); } print 'Completed without error!'; pause; } Once you know the Table object causing issues, you could try deleting the object programmatically with the following X++ Job: X++: static void deleteDamagedTableObject(Args _args) { UtilIdElements utilElement; UtilElementName tableName; UtilEntryLevel tableLayer; ; /********************************************************************/ /* Please adjust to the Table Name and Table's Layer to be removed! */ tableName = 'NameOfDamagedTableToBeRemoved'; tableLayer = utilEntryLevel::usr; /********************************************************************/ ttsbegin; select utilElement where utilElement.name == tableName && utilElement.utilLevel == tableLayer && utilElement.recordType == utilElementType::Table; if (utilElement) { utilElement.delete(); ttscommit; info(strFmt('Table object %1 in Layer %2 has been deleted!', tableName, tableLayer)); } else { ttsAbort; warning(strFmt('Table object %1 in Layer %2 was not found!', tableName, tableLayer)); } } One possibility to rebuild a damaged layer is:
Источник: http://blogs.msdn.com/emeadaxsupport...-metadata.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|