You need to sign in to do that
Don't have an account?
Emmanuel Corona
Custom Multi Select Picklist
Greetings!
I'll really appreciate your help if you can help me on how i can build a custom multi select picklist and for values, the name (records) from my custom object for example:
Object A
Name: test1
Name: test2
to N
The Multi Select Picklist values= test1, test2, to N
And add it for use it in my my opportunity page
Thank you !
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('test1', 'test1'));
options.add(new SelectOption('test2', 'test2'));
options.add(new SelectOption('testN', 'testN'));
On Page,
<apex:selectionList multiselect="true">
<apex:selectOptions ="{!options}" />
</apex:selectList>
Below sample code accomplishes the same functionality.
Here Category__c is the custom object & the multi-select picklist displays the Name field of that object.
You can change the query to fit the actual requirement.
PAGE:
CONTROLLER:
KARTHIKEYAN
Is good... but i can select more than one item and i don't see where they can go after select them... if i select one the item is not related to the opp :(