Passing a value via URL into a record producer

Jeff Krueger1
Tera Expert

I am trying to populate the description variable on a record collector form from an external URL.   I am able to do so on a new Call form with the following URL:

https://<instancename>.service-now.com/nav_to.do?uri=new_call.do?sys_id=-1%26sysparm_query=description=this+is+the+description

which results in:

find_real_file.png

however, I'm unable to successfully pass it to a record collector for the New_Call table to the description variable.   What am I missing?   Can this be accomplished the same way with a sysparm_query?   Any help would be much appreciated, thanks!

1 ACCEPTED SOLUTION

Or try below keeping the + sign


g_form.setValue('description',parm[1].toString().replace(new RegExp("\\+","g"),' '));



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

14 REPLIES 14

Try %2520



Please mark this response as correct or helpful if it assisted you with your question.

Or try below keeping the + sign


g_form.setValue('description',parm[1].toString().replace(new RegExp("\\+","g"),' '));



Please mark this response as correct or helpful if it assisted you with your question.

Many thanks!  


kristenankeny
Tera Guru

You might try something like: sysparm_processing_hint=setfield:request.parent instead.


Jim Coyne
Kilo Patron

That's going to be a bit different because they are service catalog variables you are looking to populate, but totally doable.   Check out this article - https://www.servicenowguru.com/scripting/client-scripts-scripting/parse-url-parameters-client-script...



Setup an onLoad Catalog Client script, include the function from the article in it and then you can call it to populate the variables that you need.