Need to understand how sc_cat_item_company_mtom (Available for companies) table is related to display catalog items on portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 10:43 PM
Hi All,
We have a requirement in that we need to show only catalog items which are present in sc_cat_item_company_mtom (Available for companies) table.
In this table we can create records in that we need to mention catalog item and company. If the login person is a part of the company which is in sc_cat_item_company_mtom table then we need to show the respective catalog item for the customer.
How to achieve this?
Thanks in advance,
Sangz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:00 PM
Hi you can use User Criteria for this approach. I think sc_cat_item_company_mtom is depreciated by Servicenow. Not sure though, but this is something you can do with help of User Criteria and Add the user criteria under available for related list on Catalog item
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:07 PM
Hi Harshith,
Yes, even we thought of going with user criteria but for example if we add 200 records into sc_cat_item_company_mtom then we should add user criteria for all the catalog items.
Is that feasible solution?
Thanks,
Sangz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:11 PM
Hi you need to get the company list of users and check if logged in User is part of the company and return true from User criteria advanced script. Store all the company names in a array and you can check if logged in User is part of the company.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:24 PM
Hi Harshith,
Yes I wrote that script but how to adopt that in portal. I mean in widget we need to right it right?
In that script fist i'm gliding contact relationship table and storing all the companies in one array
after that i'm checking those companies are present in mtom table or not if its present then i'm storing the sys_id of all the catalog items in one array and category of that catalog item in another array.
where exactly should I write this code?
Thanks,
Sangz