I need to restrict access to contacts.
I need to allow access to all Customers, Groups and Analysts from CompanyOne (Functional Organization = OrganizationOne) and also to Analysts (members of groups) wich belongs to CompanyTwo but are members of CompanyOne groups.
All groups (where im looking for members from other companies) have always special text in the name like (ZZZ.1st Lvl; ZZZ.2nd Lvl; etc.)
constraints I want to use:
restriction1: organization.name IN ('CompanyOne') => all kind of contacts from CompanyOne
restriction2: group_list.group.last_name IN ('ZZZ%') => all contacts from all Companies wich are members of groups with special name.
result: (organization.name = 'CompanyOne') OR (group_list.group.last_name IN ('ZZZ%'))
But it cause cartesian product.
Yes, I know about the workaround with oR and it works, but my question is, if there is a way how create the constraint without causing cartesian product.
This article may help:
KB000050056 - How to avoid a cartesian product in a where clause and error message AHD03106
Keep in mind though, some queries would impact performance.
This article as well, which goes into further details to what causes Cartesian Products in the first place.
What is a Cartesian product in Service Desk and wh - CA Knowledge