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
KevlangdoKevlangdo 

Set default (checked) value on HasOptedOutOfEmail

Currently the HasOptedOutOfEmail (Leads) is unchecked b y default and it is up the user the checked it. I would like to set the default value to "Checked" and leave it the user to unckeck it if necessary. I cannot change the default in the field properties and my attempts to set the value through a secondary field formula doesn't work.

Is there a way to set the default value on this field to checked
Best Answer chosen by Kevlangdo
Harpreet Singh 40Harpreet Singh 40
One option could be -- Create a new custom field with the same Label but a different Name with default value as Checked. Show this custom field on the page layout rather than the standard field. Let user set or reset the checkbox. Use a Workflow to set the HasOptedOutOfEmail based on this custom checkbox.

Harpreet
OSI Consulting

All Answers

Harpreet Singh 40Harpreet Singh 40
One option could be -- Create a new custom field with the same Label but a different Name with default value as Checked. Show this custom field on the page layout rather than the standard field. Let user set or reset the checkbox. Use a Workflow to set the HasOptedOutOfEmail based on this custom checkbox.

Harpreet
OSI Consulting
This was selected as the best answer
KevlangdoKevlangdo
That is a great idea. It works. Thanks
Pankaj_GanwaniPankaj_Ganwani
Hi Kevin,

Yes, you can do this through workflow rule on Lead object with Field Update Action.

Please find the below mentioned Action and workflow criteria:

User-added image

User-added image
KevlangdoKevlangdo
Pankaj

That is also a great solution. Thanks

Kevin
KevlangdoKevlangdo
I am using a combination of both of your solutions. Thanks again for your help