I have a doctype called lead, this doctype has two fields, demo_done_by and relationship_manager , both fields are link fields with the user doctype, I want a user to have access to this doctype if his name is in either of the two fields.
I tried doing this with user permissions on the doctype, but the user permissions are like AND filters, and they are subtractive, they both apply and have to be true for the permission to work* .
is there a solution for this ??
is there a solution where I can write a simple query for each user to solve this? provided the query is applicable everywhere, list view, report view basically wherever the existing user permissions is applied to?
note: in case the user permission is applied to a single field, they act as OR filters where either can be true. (example if i try to give user access to view demo_done_by for himself and another person, this seems to be possible)