Scenario: Client needs to upgrade a restriction saved search where the sales manager and general sales manager needs to view the details of the
Solution:
List>Search> Saved Searches
Edit the transaction saved search.
Criteria> Standard> Filter
Formula: CASE WHEN ({custbody45.entityid} = {user.entityid} AND {userrole}= 1045) THEN 1 ELSE (CASE WHEN ({userrole} IN (‘1046′,’1088’) AND (INSTR({user.custentity_locations_available}, {custbody_aha_sales_location}, 1) > 0)) THEN 1 ELSE (CASE WHEN {userrole} NOT IN (‘1045′,’1046′,’1088’ ) THEN 1 ELSE 0 END) END) END
Formula Numeric: equal to
Value: 1
Click Save
The “invAHA – Sales” role (internal ID: 1045) to view only the “Sales Orders” records where their name appears in the “Sales Associate” field. Users with the “invAHA – Sales Manager” role (internal ID: 1046) and “inv AHA General Sales manager” role (internal ID: 1088) will be able to view “Sales Order” records where the user’s “Location available” matches the “Sales Location” in the sales order. For users in other roles, they will have the privilege to view all records.