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
san5augsan5aug 

How do I assign string in pickList data type?

Hi,

I want to save a long string in to picklist data type "Activity_Title__c". I am facing STRING_TOO_LONG exception. 

public class MIRPriorityDetailController {
public String activityTitle {get;set;}

public pageReference SaveInterActivity(){
this.priority__c.Activity_Title__c = activityTitle;
    	upsert this.priority__c;
}
}


Best Answer chosen by san5aug
Hargobind_SinghHargobind_Singh
Hi, there are some limitations on picklists values and value length:

https://help.salesforce.com/apex/HTViewHelpDoc?id=picklist_limitations.htm&language=en (https://help.salesforce.com/apex/HTViewHelpDoc?id=picklist_limitations.htm&language=en)