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
zero1578zero1578 

Dependant Picklist Management Tool

I am looking to try and create a dependant picklist management tool, but I have read several times that older versions of the API do not support the ability to manage fields.  Is this still the case?  Is there no way to:
 
1) Get the list of all the picklist fields (done)
2) Print out the values of the controlling field and the child field based on parent field values (done)
 
3) Generate a list of values to be updated in the parent and/or child controls (done)
 
*4) Update SF custom field with the values from my app
 
I am not finding any information that is helpful for #4.  Is it impossible to manage fields through code or is it just not exposed to developers yet?  Maybe I am missing where it explains this functionality, but if someone can point me in the right direction I would appreciate it.
 
We have a lot of dependant picklists to set up and while we love that the feature actually exists, the users are overwhelmed with how long it takes to manage the fields.
SuperfellSuperfell
This is not available today, its in the pipeline, can't say for sure when it'll be available.
amit sanghaiamit sanghai
Hi,
 
How did you do the first three steps? Can you please help me on that?
 
1) Get the list of all the picklist fields (done)
2) Print out the values of the controlling field and the child field based on parent field values (done)
 
3) Generate a list of values to be updated in the parent and/or child controls (done)
 
We need dependant picklists in out application as well.
 
Thanks and regards,
Amit Sanghai.
zero1578zero1578

The API documentation actually walks you through most of that, in a way.  Between Apex Explorer (free tool) and the API Walkthrough Samples you can pull all of your fields, then alter the sample to pull all of the values of specific fields.

This block is from the API Documents.  I change mine some because I write web apps rather than console apps, but the idea is identical.  Once you have the values you can do whatever you want with them in your application, but you end up being stuck at the same point we were in that you cannot update the picklist values in salesforce through the API.

Code:

//If this is a picklist field, we will show the values
                if (field.type.Equals(sforce.fieldType.picklist)) 
                {
                   Console.WriteLine("\tPicklist Values");
                      for (int j=0;j<field.picklistValues.length;j++)
                      Console.WriteLine("\t\t" + field.picklistValues[j].value);
                }


 

amit sanghaiamit sanghai

I want to do that in Java. Can you tell me where can I find the API documentation?

Thanks and regards,

Amit Sanghai.

amit sanghaiamit sanghai

Specifically, I want to know how the servlet.picklist file is generated:

00N50000001JuMV, 00N50000001JuP9 and 00N50000001JuPZ are ids of 3 picklists. 00N50000001JuPZ is dependant on 00N50000001JuMV. I have inserted these 3 picklists with some arbitrary values.

I want to know how the following servlet.picklist file is generated:

var pl={};

pl.vals_00N50000001JuMV=['a','a','a  v  vvvv','a  v  vvvv','b','b','c','c','sddddd','sddddd','ssdsdaa','ssdsdaa'];
pl.vals_00N50000001JuP9=['a','a','b','b','c','c','j','j','m','m','n','n','v','v'];
pl.vals_00N50000001JuPZ=['g','g','gh','gh','h','h','r','r','rrrrr','rrrrr'];

pl.map_00N50000001JuPZ={'ssdsdaa':'cAAA','a':'4AAA','c':'QAAA','sddddd':'IAAA','b':'gAAA','a  v  vvvv':'GAAA'};

pl.noneLabel="--None--";
pl.naLabel="**Not Applicable**";
pl.selectedLabel="Selected";
pl.availableLabel="Available";

Thanks and regards,

Amit Sanghai.

zero1578zero1578