“Javascript:” in servicenow

If you want to write the code of server side in the client side such as in default value or the refer quilifer, we need to use the “javascript: ” as below

if you want to set default value of reference field as current user:

javascript:gs.getUserID()

if you want to set the advance filter to user reference field where you need to show the list of users having first name = u_profile_name (u_profile_name is a field on the current record)

javascript:”u_first_name=”+current.u_profile_name

 

if you want to call the script include from filter or reference qualifier or default value

javascript:new myScriptInclude().my_refqual().

 

About the author

Leave a Reply