How to hide a field dynamically based on user's role?

I’m trying to write code to hide a particular field in the edit view of quotation based on the role of user. Can anyone help me for the same.


I’m sure someone here can help you with code examples/links, but before you add custom code to modify the EditView, pls keep in mind that users can alter a record with other methods too, I’m thinking of:

  • inline edits
  • workflows
  • API access (including third party apps like for mobiles)

so just for you to know: Hiding the field in the EditView doesn’t make it fully secure from user manipulation.