cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Web-IC END BUTTON custom code validation

0 Likes
422

Hi,

Below is the my requirement.

I need to raise a error message when the 'END' Button in IC is pressed without saving newly created POD details under connection object.

Can you please suggest where I need to do code for this validation.

Thanks,

Vinod

Accepted Solutions (0)

Answers (1)

Answers (1)

anborck
Participant

Hi Vinod,

you can register your controller to the end-interaction-event.

To do so, you need to register your controller like this:

" register for interaction started
  DATA(lr_event_service) = cl_crm_ic_services=>get_event_srv_instance( ).


  lr_event_service->subscribe(
      event_name = cl_crm_ic_interaction_manager=>event_interaction_end_request
      prio       = 99
      listener   = me ).

Implement the interface IF_CRM_IC_EVENT_LISTENER in your controller.

Also implement method IF_CRM_IC_EVENT_LISTENER~HANDLE_EVENT:

 CASE event->get_name( ).
    WHEN cl_crm_ic_interaction_manager=>event_interaction_end_request.

      on_interaction_end_request( event ).

  ENDCASE.

In the event handler method you can raise the error message.

I think this should already interrupt the end-event.

Please reward if helpful.

Regards,
Andre