Notifications
Announcements
No record found.
Hi All,
I have an issue that the infolog buffer is totally reset so that error details already cumulated for records processed earlier (purchLine.update()) via a set enumerator are lost after iterating next records which confirm PurchTable records not only updating line details. If I dont want to lose those error details stacked but show these to users, what shoud we do?
Thank you.
This thread is missing context, therefore let me add it. More details can be found in this thread: how to call another method in a 'try' block in case an exception is thrown inside a transaction.
Especially:
I found that a block of code which reconfirms the PO after purchLine.update() causes the reset of the infolog and therefore, I will have to take a copy of the infolog before hitting this reconfirming-code and add it again after this reconfirmation of PO is done. Is there a way to set the infolog caught in catch block and get it when I want it?
I found that a block of code which reconfirms the PO after purchLine.update() causes the reset of the infolog and therefore, I will have to take a copy of the infolog before hitting this reconfirming-code and add it again after this reconfirmation of PO is done.
Is there a way to set the infolog caught in catch block and get it when I want it?
You can copy data from infolog to your own variable, run the process and put message back from your variable to infolog.
For example, look at How can we get text from infolog ?.
Hi,
I managed to copy infolog data to my own variable 'log' before the process of reconfirming PO which resets the infolog buffer.
how should I write the code to put the stored infolog data back to the infolog?
setPrefix('Result'); while (enumerator.moveNext()) { try { ttsbegin; setPrefix(strFmt("PO: %1",purchLine.PurchId)); ... purchLine.update() if(purchLine.purchTable().DocumentState != VersioningDocumentState::Confirmed) { // copy data from infolog to my own variable 'log' log = infolog.copy(1,infolog.num()); PurchFormLetter::construct(DocumentStatus::ConfirmationRequest).update(purchLine.purchTable(),''); //here I need to put the stored 'log' back to infolog ? how? } ttscommit; } catch { } }
Please open the link I gave you above and read the last reply.
Actually, I shared the same link a few days ago, but I guess you didn't pay attention. As in the link,
-SysInfologEnumerator::newData(infolog.copy(fromLine, toLine))you can insert values to an enumerator, and then using;-infolog.addyou can add it back to the infolog
The truth is, I don't understand why you wanted to add copy to the infolog. Copy will not reset the current infolog. From what I saw on your the other thread, you were the one who emptied the infolog (with infologData)
Do system classes clear infolog?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 646 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader