Have an function to close the current remote, as if the user had pressed the back button. Eg device.close();
Have an option with device.switch not to return from that remote via the current remote, ie in most cases return to UR's main menu. Eg device.switch(true);
many thanks.