Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to Know the Application Name of currently opened form?

Community Alums
Not applicable

Hi,

I have two applications ,in that application i have two modules with same name and corresponding to same table.

here when i click the module i want to know from which application menu i have clicked.

i have hrcase and itdesk applications,

in that i have two modules with same name as newcall.

if i click newcall from itdesk application ,i wnat to get the application name.

can any one help me on this , i got strucked here from past couple of hours.

Thanks,

Rajendra Prasad Darshanam

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Try this in a on load script. This script will give the sys id of the module being used.



var gURL = new GlideURL();


gURL.setFromCurrent();


var moduleSYSID = gURL.getParam("sysparm_userpref_module");


alert(moduleSYSID);



Now you can differentiate the application using the module being accessed.


View solution in original post

6 REPLIES 6

Inactive_Us1474
Giga Guru

Have you checked the application picker. Are the applications under Global scope or Application scope?



Thanks


Akhil


Hit Like/helpful/correct, if applicable.


Harsh Vardhan
Giga Patron

Hi Rajendra,



According to me, i will create a form link type ui action on global table.


whenever i enter on form or any other module, that ui action will be visible and whenever i will click on that ui action that will show me massage about application name.



by the way you can use "gs.getCurrentScopeName();" to get application name.



Regards,


Harshvardhan


Kalaiarasan Pus
Giga Sage

Try this in a on load script. This script will give the sys id of the module being used.



var gURL = new GlideURL();


gURL.setFromCurrent();


var moduleSYSID = gURL.getParam("sysparm_userpref_module");


alert(moduleSYSID);



Now you can differentiate the application using the module being accessed.


Community Alums
Not applicable

Thanks Kalairsan, you saved my day man,