Pin a catalog in popular items

Ramel
Mega Guru

Hi Community.

 

We are trying to pin a catalog in the popular list regardless of the usage. Found one article in community that states to hardcode the sysID of the catalog item in the server script of the widget. 

 

https://www.servicenow.com/community/developer-forum/pin-a-catalog-item-to-the-list-of-popular-items...

 

In that community post, it was mentioned where you can add the code. The widget we are using is the 'SC Category Page'. It was also mentioned that widget where you can add the code for it to work, however we cannot find that code in the server script in 'SC Category Page'.

 

This is the note from that post:

**By the way the popular items list is also presented in the catalog on the sc_category page by a different widget (SC Category Page [sc-category] ) the below logic also works in that widget too but needs to be inserted into the relevant part of the server script (I inserted into the getPopulateItems function just after the line var allowedItems = getAllowedCatalogItems();  as this is where the "items" variable which the script pushes into is declared)"

 

however, wee are unable to find this line: var allowedItems = getAllowedCatalogItems();

What we have is 

function getAllowedCatalogItems () {
var allowedItems = [];

but here items.push(item) will be undefined.

 

Can anyone advise.

Thank you.

 

Regards,

Ramel

0 REPLIES 0