+ Start a Discussion

Programatically updating dependent picklists

We have two picklists: Product and Version
We'd like to update them programaticaly.  I know we can add values to each (removing is another story) but can we maintain/update the dependencies via code?

If you can point me to the documentation that'd be super helpful!



Here are some more details:

  • The picklist values are in XML.  I'm not sure how, if at all, the dependencies are represented in the XML.
  • Additions, removals and updates would all be pushed.
  • Ideally the data would be updated nightly in SFDC.

Ok, as I have more info I'll add it to this thread.




You'll need to write some custom code. Assuming your push mechanism is under your control (i.e. you can modify its behavior or source code), you can accomplish this with the Metadata API. There's certainly no reason why this couldn't be achieved.




Can you please throw some light on how we can do it.I tried exploring metadata API but found that we can only read dependent picklists values where dependency is already set by admin.But if we want to set dependency using Salesforce API programatically through java code .Is is possible?

Please throw some light on how to do it...


Thanks and Regards

-Sameer Gijare