Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Locking Fields dynamically


FredP

Recommended Posts

I would like to create a field that sets a record as locked. Its just an on /off flag.

 

If lock=1 then field is not editable.

else

field is editable.

 

I have a need to lock a record so someone doesnt change the wrong record. They would have to unlock it first.

 

Im not talking about permissions. I just want to be able to set a "soft lock" on a record, so someone would have to really intend to change that record, to first unlock it, then edit it.

 

Thanks

Fred

Link to comment
Share on other sites

This can be done in the privilege set's "Records" section, in the column for Edit. Use "Limited", and define a calc that determines whether the record can be edited based on whether the soft lock field has a value or not.

 

Then use a script to change the soft lock field, where the script is set to run with Full Access.

Link to comment
Share on other sites

  • 3 months later...
Then use a script to change the soft lock field, where the script is set to run with Full Access.

 

I'm trying to set this up and getting stuck... the locking part works great with custom privileges, but i can't script to unlock the record. Once locked out of a record, i get a 'Your access privileges do not allow you to perform this action' alert when the script tries to change a value.

 

The unlock script sets the value of the lock field back to 0.

what am i missing?

 

(the custom privilege calculation allows editing a record if

lock ≠ "1")

 

 

While i'm at it, is there a way to lock specific fields only?

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use