function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amber9904amber9904 

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!

Thanks!
Amber

amber9904amber9904

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.

Thanks,

Amber

sfdcfoxsfdcfox

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.

Sameer_NicknameSameer_Nickname

Hi

 

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