Hi Zappia,

With the use of RecordInsertList, I think I've achieved what you want.  The 
following code inserts successfully.

    RecordInsertList ril = new RecordInsertList(tableNum(YourTable));
    YourTable yourTable;
    ;
    ttsbegin;
    yourTable.Field1 = "2";
    ril.add(yourTable);
    ttsabort;

    ril.insertDatabase();

You will need to do the insertDatabase() outside of your tts block but that 
shouldn't be too hard.

Regards,

Steeve... 


-----Message d'origine-----
De : Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] De la 
part de Zappia Alessandro
Envoyé : 20 février 2006 14:05
À : development-axapta@yahoogroups.com; Axapta-Knowledge-Village@Yahoogroups.com
Objet : [Axapta-Knowledge-Village] Forced commit

Hi all!

 

I know that this may sound as an odd request, but I'm looking for some
trick to force a commit in a nested transaction. The idea is to keep the
log of occurred actions in a specific table during an invoice posting
routine, to track successful events and failures.

I wrote a method that I call to log a specific event (a sort of
"checkpoint"), but If the whole process fail and a global abort occurs,
all the records that I wrote in the table are rolled back, and this is
not what I meant...

So, I'd like to "force" a commit (as if it were outside the transaction
scope...) on my log table.

Anyone has got ideas?Is my intention too wicked?

 

Thank you very much!

 



[Non-text portions of this message have been removed]



Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends. 
Yahoo! Groups Links



 







Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Axapta-Knowledge-Village/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to