Need to understand how sc_cat_item_company_mtom (Available for companies) table is related to display catalog items on portal

sangz
Kilo Contributor

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.

find_real_file.png

How to achieve this?

Thanks in advance,

Sangz

10 REPLIES 10

Hi you need to write the script in User criteria. Check Attached image. once you create this. you need to add this User criteria on a catalog item-->related list-->Available for

Regards
Harish

sangz
Kilo Contributor

Hi @Harish KM ,

 

I created user criteria and added that as well, But issue is if some other user criteria matches the conditions/ no 'available for' in catalog item then that catalog item also will display on portal right?

Thanks,

Sangz

Hi Usually you need to add User Criteria to Available for only when you need to do restrictions. It doesnt make sense to have 2 criterias for same condition,

User criteria will validate Available for. For example if you add 3 user criterias under available for. If user satisfies any 1 criteria it will grant access.

Regards
Harish

OlaN
Giga Sage
Giga Sage

Hi,

As stated on the Docs, you should use User Criteria instead of that table (sc_cat_item_company_mtom).

sangz
Kilo Contributor

Hi OlaN,

In that case we should create such a user Criteria, if that Criteria satisfy then only we should give visibility right? What if other user Criteria also satisfy the conditions or if we catalog item doesnt have any 'available for' then that catalog item also will display on portal right?

In that case, what should we fallow?

Thanks,

Sangz