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 get current catalog item name or sys_id using catalog client script?

jamesgo
Giga Contributor

I have a variable set that used by multiple catalog items, how to write a catalog client script to get the current catalog item information(name, sys_id, etc)?

11 REPLIES 11

Thanks Deepak , the below thread solved my query


https://community.servicenow.com/message/775426#775426


kathiravan717
Tera Contributor

Hi,



Get the value of Order Guide in Catalog view



var a=g_form.getParameter("sysparm_guide");


alert (a);



Get the value of Current catalog ITEM


  var b=g_form.getParameter("sysparm_active");


alert (b);



In normal way, get the sys_id of catalog item


  var c=g_form.getParameter("sysparm_id");


alert (c);