scriptcase return calling application
SCRIPTCASE Redirecting to a destination stored in a variable
I have solved this problem by removing default exit button in A and B and adding a custom exit button in the called app C than once pressed redirects to the calling app A or B
You can know the calling app by looking at php variable $_SERVER[‘HTTP_REFERER’]
The caveat of this approach is that if you have another app D calling C you need to modify the code in C to manage also this case.