Call Catalog Item from UI Action button

elphilli
Tera Contributor

@Ankur Bawiskar 

 

Hey Ankur,

 

Below is the code I used from your previous thread but tried to tweak it to call the Catalog Item from the UI Action button instead of clicking on a link. Please see below -

 

} else if {current.category == "Complaint") {

var portalUrl = '/sp?id=sc_cat_item&sys_id=' + 'mySysID';
g_navigation.open(portalUrl, '_blank');

 

Unforturnately, this is not working. Can you help?

2 REPLIES 2

elphilli
Tera Contributor

@Ankur Bawiskar 

 

Note: the ELSE IF statement is checking if the Category is set to Complaint (Interaction table) then the Catalog Item will open in same tab or new window. Supposedly...

Ankur Bawiskar
Tera Patron
Tera Patron

@elphilli 

where is this script written?

is that UI action a server side or client side?

you are using current object which is server side and then g_navigation which is client side.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader