0

I want to assign selectOption values to picklist field. like:

public String[] selectOptions{get;set;}
Object obj = new Object(picklistfield = selectOptions);

can I do like this?

Thanks

0

You can't assign the LOVs for a pick list field like this. You have add the values in LOV through configuration . However, you can instantiate an object like this , assign the selected value and created a record that goona have a selected values.

| improve this answer | |
  • Basically i am querying on a object, from where i am getting some values then assigning them to picklist field to display in vf page – salesforce Developer Jan 26 '16 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.