Get the name of the previous screen when being navigated to Invalid Permission Screen
Application Type
Mobile
Service Studio Version
11.11.7 (Build 45085)

Is there any way that I could get the name of the screen which the account doesn't have permission to access in and use it and an input parameter in Invalid Permission Screen?

Solution

Hi Janakiraman JR and Siddhant Chauhan,

Because the Security Exception role is required, I'm not able to get the name of the screen that I try to access by those ways. However, I figured out the way to get it by saving the name to a client variable whenever I click on a link or menu to access the screen. So when it direct to the InvalidPermission Screen, I can get that name from client variables to display.


HI Linh Pham 

Use the following javascript to get the name of the current page name and pass it as a input parameter


var path = window.location.pathname;

var page = path.split("/").pop();

console.log( page );


Thanks and Regards,

Janakiraman JR

Solution

Hi Janakiraman JR and Siddhant Chauhan,

Because the Security Exception role is required, I'm not able to get the name of the screen that I try to access by those ways. However, I figured out the way to get it by saving the name to a client variable whenever I click on a link or menu to access the screen. So when it direct to the InvalidPermission Screen, I can get that name from client variables to display.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.