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

Make a field non modifiable


Johnny Boy

Recommended Posts

Happy Holidays all

Is there a way to make a field non modifiable after a value is chosen? In an invoicing solution I have I would like to prevent a user from modifying the CustomerId field once a Customer value is chosen.

Thanks,

John

Link to comment
Share on other sites

Hi John, here is a "low tech" way I solved this. Let's say the field you want to lock is "Name". Create another field "Lock Name". Now set up "Name" with the following validation

 

click the validation by calculation and use the following calculation:

If(IsEmpty(Lock Name ), Name = Name, Name = Lock Name)

 

Put the Lock Name on a layout that the user doesn't have access to.

 

When the record is created imbed into a script that exits that page the following script step

Set(Lock Name) - "Name"

 

Now when a user tries to change "Name", they get a warning message. They can't get to Lock Name since that layout is not available to the user.

 

Ron

Link to comment
Share on other sites

Ron

Took about 10 minutes and works like a charm. If I ever want to unlock a record I just need to change it on my maintenance layout. Thanks for the help.

John

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use