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
SaintMichaelSaintMichael 

Updating Picklist value

I have the following code, which the IDE shows an error for, since it is a pick list field: accountUpdate.TRAINING_HISTORY_END_YEAR__c

 

if(accountUpdate.TRAINING_HISTORY_END_YEAR__c.equalsIgnoreCase('-- Please Choose --')){
			.....do something
		}

 Is there any way I can set a value into the pick list field?

NJ101NJ101

Hi,

 

I'm not sure what was the concern here. The code given will check for the value of   Training_History_end_year__c field, which should work fine.

 

But you have mentioned that you wanted to set a value. Hope you know that seting a value is simple as <fileld> = 'new value'; But then this value will not get added to the existing picklist options.

 

 

Could you elaborate more on your need and also provide the error message that you are getting?

 

Cheers,

NJ.