Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to get Query String in Client scripts

prasad48
Tera Guru

How to get QueryString values in clients script. I am looking for a way to write code to work for Service Portal   and also native service now

6 REPLIES 6

Hello Prasad,



Please refer below article by b-rad


3 Ways to Populate Values in ServiceNow via the URL


Abhinay Erra
Giga Sage

Always use Call back function when doing GlideRecord queries on client side.



var r = g_form.getValue('thisField');


var q = new GlideRecord('thisTable');


q.addQuery('field1', r);


q.query(CallBack);


function CallBack(q){


while(q.next()) {


//do something


}


}