Is it possible to assign perm level to field dynamically?
My scenario is like below:
We have two types of quotations, Budgetary and Firm.
Sales Users create the quotations, for budgetary quotations prices are filled by them. Sales Users can see quotations created by them (Owner restriction), Sales Manager can see all the quotations.
For firm quotations(these are mostly govt tenders and are price sensitive), the quotation is created by sales user but the prices are filled by HOD.
My requirement is that the Sales User (owner) or sales manager should be able to see the quotation but not the price for firm quotations.
If I use permission levels, then the price fields of quotations of both types will be not visible to sales users, which I don’t want.
Is it possible to set the permission levels as below:
(Here enquiry_stage is a custom field of type Select with two options as Draft and Budgetary)
If doc.enquiry_stage == “Budgetary"
Set permission level = 1
If doc.enquiry_stage == “firm" and doc.status == “Draft”
Set permission level = 1
If doc.enquiry_stage == “firm" and doc.status == “Submitted”
Set permission level = 2
Is its possible this way or please suggest if there can be any other workaround.
Thanks
Rasika