28.06.2009, 03:06 | #1 |
Участник
|
C# and AX Development: How to delete AOT nodes by code (UtilIdElements solution)
Источник: http://olondono.blogspot.com/2009/06...s-by-code.html
============== In my old post: How to delete AOT objects (AX/Axapta), I have used the TreeNode class. There is another useful method by using the UtilIdElements system table described in the following links: - MS KB 913530 (CustomerSource) - forum topic: microsoft.public.axapta.programming - Currupt records in UtilIdElement and UtilElements Warning: Serious problems might occur if you modify the UtilIdElements table using this or another method. Modify system tables at your own risk. The code: static void Job1(Args _args) { UtilIdElements utilElement; ; ttsbegin; select utilElement where utilElement.name == 'myElementName' && utilElement.utilLevel == utilEntryLevel::cus // any layer && utilElement.recordType == utilElementType::Table; // object type if (utilelement) { utilElement.delete(); ttscommit; info('Record should be deleted now.'); } else { ttsAbort; info('Could not delete record, or it was not found.'); } } Источник: http://olondono.blogspot.com/2009/06...s-by-code.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|