Custom command to invoke Custom Service method finally invoking a command
We have requirement where before logout of application user needs to be provided with options to whether log out or not based on a custom validation done through business service method invoked on logout. Can someone tell how to invoke a command from business service method.
It is something like below,
Command Name: CustomLogOut
Command Business Service: CustomLogOutService
Command Method: checkforPendingTasks
Inside my checkforPendingTasks BS method, we will be checking for pending tasks in current logged in user account. Then display confirm box with message have pending tasks do you want to log out. On click of no nothing will happen but on click of yes actual vanilla logout command should be invoked and we are stuck here how to invoke command from BS method or browser script (if possible).