Showing results for 
Search instead for 
Did you mean: 

Message for multiple unsaved transactions before ending the latest one

Former Member
0 Kudos

Hello Experts,

We have a scenario wherein the call-centre agent is creating a Sales Order. He doesnu2019t save it, and opens another one on top of it. Now he cancels the second one also, and if BACK button is clicked now the earlier unsaved SO can be seen. This means that the earlier SO was being saved in some buffer.

Now if the agent had ended the transaction after cancelling the second SO, no error message comes informing him that thereu2019s one more below it, which is unsaved. The requirement is that if the agent is ending the transaction at the topmost SO, he should be informed there are N number of SOs below it which are unsaved through some error message preferably.

Please guide me as to how I find out where the unsaved transactions are being buffered, and how can I go ahead with implementing such a functionality.



Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

Hello Richa,

This is a very generic requirement where the user may keep on creating orders without saving them. They do get stored in BOL buffer unless user clicks on end interaction or ends the session.

Have a look at the following sample code which will help you identify open orders and need to be saved or cancelled.

  lr_bol_core = cl_crm_bol_core=>get_instance( ).

*** Get global transaction
  lr_transaction = lr_bol_core->get_transaction( ).
  lr_context  = lr_transaction->get_name( ).
  lv_entity_manager = lr_bol_core->get_entity_manager( ).
*** Check for unsaved data
  lv_save_needed = lr_transaction->check_save_needed( ).

The above piece of code will help you identify what you are looking for.

I hope this solves your issue.