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
Debbie PerrottDebbie Perrott 

If an apex trigger is set to a picklist field value - what does it do if the field is null?

Sorry if this is a stupid question but I am an Admin rather than a developer. We have a trigger that creates renewal opportunites - and one of the criteria is to ignore inactive accounts. 
User-added image

On the account there is a field called account status and it is a picklist with the values of active and inactive. If the account has no value in this field - will it return a true or false value? i.e will the trigger ignore this account in the code.

 
Prosenjit Sarkar 7Prosenjit Sarkar 7
Hi Debbie, 

your information is incomplete. We cannot debug anything from the code snippet you provided. Can yo please share the whole trigger if possible ?

Thanks,
Prosenjit
Shamsi 110Shamsi 110
If picklist does not have any value specified then it will return empty/Null as te nature of picklist is text. If you would have defined the checkbox type (Boolean) then default value would have returned .

Mark my answer, if you find this useful.

Thanks,
Hasan Shamsi