why dont you try try catch block and handle ttsbegin and ttscommit accordingly
Søren Ager <[EMAIL PROTECTED]> wrote:
Søren Ager <[EMAIL PROTECTED]> wrote:
Den 27. september 2005 15:26 skrev Brandon George:
> protected void insertJournal()
> {;
> ttsbegin;
> numberSeq = this.allocateNumAndVoucher();
> [number, voucher] = this.getNumAndVoucher();
>
> if (this.updateNow())
> {
> this.postUpdate();
> TransactionLog::create(this.transactionLogType(),this.transactionLogTxt());
> ttscommit;
> }
> else
> {
> throw error(strFmt("@SYS21533"));
> ttscommit;
> }
>
> }
>
> Added another ttscommit in the else{} block. I believe this is a bug,
From the Developers guide:
Notice that when an exception is thrown inside a transaction, the transaction is automatically aborted. This applies both for exceptions thrown manually and for exceptions thrown by the system.
According to that you should not get tts problems. The "right" code would be to have the commit after the else block (on the same level as the begin)
Hilsen
Søren
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
Sharing the knowledge on Axapta.
YAHOO! GROUPS LINKS
- Visit your group "Axapta-Knowledge-Village" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.