Need to redirect to catalog item form when a catalog Item is selected

Gaurav Mishra
Tera Contributor

I have a reference type variable on a record producer referencing sys_cat_item table.

What I am looking for is, when any catalog item is selected from the list, it should redirect user to that catalog item form

so the user can fill it out then submit the form.

I am new and less knowledge of scripting so please explain in brief.

1 REPLY 1

Anil Lande
Kilo Patron

Hi,

You can create onChange client script on your record producer which should run on change of catalog item field.

You can use below logic in your client script:

if(newValue){
   //To redirect to portal view
   top.window.location = "sp?id=sc_category&sys_id="+newValue;
}

 

Similar solution was proposed on below link:

 

https://www.servicenow.com/community/developer-forum/is-there-a-way-to-redirect-the-catalog-item-to-...

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande