How to Fetch Parameter Value using Business Rule ?

BlackCoder16
Tera Contributor

Hello Guys 

I Have a Requirement like when user click on an URL then  the Value of parameter will in a string field.

So this is my business rule :


SUBHASHIS1_0-1673345285542.png


Result is coming but is there any out of box function that can help in client script  then please help me with it.

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@BlackCoder16 

you can get url parameter value directly inside onLoad client script

Example: you enhance it further from your side once you get value in client script

var gUrl = new GlideURL();
gUrl.setFromCurrent();
var ref_data = gUrl.getParam("sysparm_query");
Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@BlackCoder16 

you can get url parameter value directly inside onLoad client script

Example: you enhance it further from your side once you get value in client script

var gUrl = new GlideURL();
gUrl.setFromCurrent();
var ref_data = gUrl.getParam("sysparm_query");
Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks Ankur

Is there any other way to do by using Business rule ?