12.12.2008, 13:05 | #1 |
Участник
|
DeniZone: RunBase - classes and Best Practice
Источник: http://denizone.blogspot.com/2008/10...-practice.html
============== There are certain classes which serve as excellent templates. One such class the LedgerExchAdj-class. If only all runbase-classes were as this one. In my opinion its simplicity and readability is top-notch. I've edited the class-specific code so that only the run() template is present, which included that all important error handling, which one might forget X++: public void run() { #OCCRetryCount ; try { ttsbegin; // Insert code here ttscommit; } catch (Exception::Deadlock) { retry; } catch (Exception::UpdateConflict) { if (appl.ttsLevel() == 0) { if (xSession::currentRetryCount() >= #RetryNum) { throw Exception::UpdateConflictNotRecovered; } else { retry; } } else { throw Exception::UpdateConflict; } } } Источник: http://denizone.blogspot.com/2008/10...-practice.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|