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
Hari G SHari G S 

Default Setting




I have added a new number field in Account object. I want to set a default value 0 to this field. How is it possible? Please help.


Thanks and Regards

Hari G S



If it can't be done at the DB level (as an option when creating/editing the field) you could create a trigger on object insert that checks if the field is equal to null and if it is simply populate it with the value you want as the default.

Hari G SHari G S


Hi, Thanks for the reply.


Is it possible to set the default value when creating/editing the number field?



Hari G S


Edit the field and specify a value in the Default Value formula. Note that this won't affect existing records, only new records that are created from that point forward.