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
AnjaneyluAnjaneylu 

making field as dafault

hi to all,
how to make field as default for country field(text: datatype Ex: INDIA) for every record creation.

thanks in advance,
Anji
Best Answer chosen by Anjaneylu
joey_hoey19joey_hoey19
Hi Anji, 

When yo create the field you can default the text value as per below. Make sure you add quotations around the text.
Thanks.
Joey.

User-added image

All Answers

joey_hoey19joey_hoey19
Hi Anji, 

When yo create the field you can default the text value as per below. Make sure you add quotations around the text.
Thanks.
Joey.

User-added image
This was selected as the best answer
AnjaneyluAnjaneylu
Thanks mr. joey,
may i know is there any way to approach the same thing..

thanks in advance.
Anji
 
joey_hoey19joey_hoey19
Hi Anji, 

there is Workflows, where you can automatically populate the field after a record has been created but really this is kind of unnecessary when you can just use the 'Default Value' field when creating an object new field.

Cheers,
Joey.
AnjaneyluAnjaneylu
Nice Mr.Joey,
here with Workflows we are populating field value after the  record has been created. but i need to populate before record has been saved, other than first approach..

Thnaks, 
Anji.
joey_hoey19joey_hoey19
Anji, 

In which case, you would want to create a Apex Trigger that runs on "before insert" or a record which would automatically prefil you field to what you want.
Thanks,
Joey.