function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HuluSFAdminHuluSFAdmin 

Locking objects

I have a custom object called Flight. The data is entered by the Sales team (Role = Sales). Ad Operations (Role = Ad Ops) comes in, reviews the Flight, and marks it as “Reviewed” by setting a checkbox to true. Once a Flight is marked as “Reviewed”, I want to prevent the Sales team from changing it. The Ad Ops team has the ability to change “Reviewed” flight but not the Sales team.

If a user whose Role is "Sales", view the Flight object I would like to grey out the Edit button. Any idea how I could do something like this?

Note: I am not using Approvals just a simple checkbox to indicate that the data has been reviewed.

RickyGRickyG
HulaSFAdmin -

May I ask you why you are not using approvals?  It seems that this is tailor-made for an approval process, which will also lock down a record for just the reasons you indicate. 

Depending on the reason, you might be able to shape an approval process to correspond to your needs.