Hello guys,
Being beginner in F&O development, may I request some advice. If using Info("textMessage") will instantly show the message in the UI, what is the different if we're using Infolog.add() ? and how exactly using it ?
I'm creating a function which having process flow something like this : Processsing TempTable data -> create Sales Order -> Create Sales Invoice.
While I'm create this in a transaction block (ttsbegin....ttscommit), currently ata each process I'm using Info() to inform the step, for example when Sales Order created, I inform "Sales Order number 999 has been created", etc.
Issue is, if there is error along the way, for example posting invoice failed, this transactions will roll-back, which is the way I expected. But in the UI looks weird (and misleading) since there was a message (information) saying Sales Order xxx has been createdwhile in reality it is not because it is rolled back.
May I know how to handle this ?
I have a catch error handling in the end, since I also put this process under Try..Catch() block, can I use infolog.add() instead, so the info can be hidden first, but if there is an error, I think I want to have an error log saying Sales Order has been created for helping us to identify at least Sales Order process is passed and the error surely after that process.
Thanks,