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
ThronThron 

Restrict editing of specific fields on object creation only

Hello, looking for a little help from some of the formula / validation gurus around here please.

We have 4 custom fields on the Opportunity which are calculated revenues etc. from an APEX class. When the user creates a new Opportunity we don't want them to be able to put anything in those fields (text boxes). But once it has calculated and entered a value in the text boxes we want the restriction to be lifted and the user able to potentially edit them if need be.

I've thought of a few clunky ways to add this into my APEX class but I was hoping there was an easier solution via a formula perhaps? I'm not as proficient with formulas or validation rules so I was hoping maybe someone here had an idea.

Appreciate the help in advance, thanks!
-Jon
vmanumachu1.393650924860069E12vmanumachu1.393650924860069E12
You could write a validation rule like the below:

AND( ISNEW() , TrackingNumber__c != null)

I have taking Trackingnumber as an example, you can replace with your own fields.

Please mark as best answer if it works for you. It helps others.