You need to sign in to do that
Don't have an account?
Alexander Goodman
Apex setting a mutiselect picklist value from blank
Hi,
I am trying to figure out how to set a value in a Muti-select Picklist if its blank. How would I first find if it is Blank then set it to a value to Other, Note: I am trying to learn Apex so a bit of guild for the future would be greatly appreciated.
Thanks in advance.
I am trying to figure out how to set a value in a Muti-select Picklist if its blank. How would I first find if it is Blank then set it to a value to Other, Note: I am trying to learn Apex so a bit of guild for the future would be greatly appreciated.
Thanks in advance.
Then you can check with instance of the object.industry__c == null ,then do your stuff .
All Answers
Is it possible to post your sample code ,I will try to modify your code .
else add <apex:selectOption itemLabel="--Select Object--" itemValue="blank" /> in your page .
Thanks
Manoj
this is what I have so far
public class OpportunityPicklistFix {
public OpportunityPicklistFix() {
Public String Fields {get;set;}
List <SelectOption> OPS = new List<SelectOption>
public List <select SelectOption> getIndustryValues (Accounts ,String Industry__c, String Other)
}
}
What exactly your requirment is ? Could you please explain bit more .
sure, I am as a bit of a exercise (as I am learning apex) I am trying to create a class/trigger that will fire when a mutiselect picklist called industry__c, is blank and when it is it then defaults the value to 'Other', all I want to know is how do I get the Apex to lookup the value then change it when its Blank.
Kind regards
Then you can check with instance of the object.industry__c == null ,then do your stuff .