You need to sign in to do that
Don't have an account?
Alvin Tai
How do I use a trigger to update picklist values with records from a separate custom object?
This sounds like what I need, but I can't get it to work: http://salesforce.stackexchange.com/questions/27327/how-to-update-picklist-value-dynamically-from-custom-object
I'm pretty new to salesforce, so I'm not really sure if this is even the right direction...
rigger populatePicklist on Code__c(After Insert){ List<selectoption> newCodes= new List<selectoption> (SELECT Picklist__c from Unit__c where Unit__c.Part__r=Code__c.Part__r); newCodes.add(trigger.new[0].Name) update newCodes.values(); }
I'm pretty new to salesforce, so I'm not really sure if this is even the right direction...
The link your are refering to have enough details on how to do it!
Note: You can never over-ride picklist values of a Packlist field on some object directly from Apex code. You MUST need to have that picklist as custom picklist where you need to use Apex and VF.
Again, thank you so much for your help. I've spent way too long trying to do this...
PS: if this answers your question then hit Like and mark it as solution!