Restrict the saved search results for different role.

Scenario: Client needs to restrict the saved search results such that the user with the salesperson could view only the transaction results with their name on the transaction as salesperson.

Solution:

List>Search> Saved Searches
Edit the transaction saved search.
Criteria> Standard> Filter
CASE WHEN ({custrecord_jj_sales_person_ahap_39.entityid} = {user.entityid} AND {userrole}= 1045) THEN 1 ELSE (CASE WHEN ({userrole}!= 1045) THEN 1 ELSE 0 END) END
Salesperson Internal ID : 1045
Click Save
Functionality of the criteria: User name({user.altname}) is in the sales person({sales_person}) field and the user role({userrole}) is sales person(1045: internal ID of sales person role)

Leave a comment

Your email address will not be published. Required fields are marked *