You need to sign in to do that
Don't have an account?
Reusable Picklist Options
Is there a way to maintain a "Master List" for picklists that maintain the options across Objects? This way one could create multiple custom objects, each with the same picklist, but to avoid having to update each list individually, the "Master List" could be updated with the changes cascading out to each picklist. I know there are ways to accomplish this via visualforce and apex, but these solutions do not change the list itself so that a mobile user would see the updated list on his/her iPhone.
I guess I am asking if there is a way when a new record is added to a custom object to have an Apex Trigger fire that adds the record to a picklist value on one or more other custom objects?
No, there's no way to do that, although Universal Picklists are a popular item on ideas.
I would note that what you are suggesting doesn't scale that well though -- what happens if you add 1000 new records to that custom object? You'd end up with a mighty big picklist.
That said, universal picklists would be nice, but they don't exist as of this writing.
All Answers
No, there's no way to do that, although Universal Picklists are a popular item on ideas.
I would note that what you are suggesting doesn't scale that well though -- what happens if you add 1000 new records to that custom object? You'd end up with a mighty big picklist.
That said, universal picklists would be nice, but they don't exist as of this writing.
LOL, nothing I do scales well!
I'll go vote up the Universal Picklist idea, I mean seriously, webexone has them for crying out loud!
I think you can do it with Visualforce and Apex but it's more a workaround if you need this today.
you can create a custom object or even better a custom settings where you define your picklist
then with VF and Apex, you substitute any picklist with this custom picklist.
You will certainly end up creating a VF component with 3 attributes: object name, field name and picklist name.
like <c:ReusablePicklist object="Account" field="myPicklist__c" picklist="UniversalPicklist__c">
and your component can display the customPicklist (UniversalPicklist) and on save you upload the selected value in the object.field (Account.myPicklist__c)
But your field (myPicklist__c) will be a text and you will loose all picklist functionnality in Formula, report,etc... as it's not a real picklist!!
I suppose that it could be done by brute force by writing a tool to maintain Common Picklists using the MetaData API.
A different brute force approach is to pull the objects into Eclipse, then, with the file system, navigate to the Eclipse workspace ProjectName/src/objects directory.
Then use whatever tool you might want to apply the same edit of the Picklist values to the various XML files. Then use Eclipse to deploy it all back.
But, in essence, you're right, a true Universal Picklist capability would be far nicer.
Best, Steve.
This tutorial shows you how to create a component which mimics the standard salesforce picklist and is populated dynamically by the members of a separate object:: Salesforce Universal Picklist Workaround
Check it out and let me know what you think!