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
Mr SlingMr Sling 

Help decoding Visualforce/Javascript Picklists - how to change options in 'src=/servlet'?

We hired a company to help us get up and running last year with a bunch of custom pages in Salesforce.  Since then, we've taught ourselves enough Visualforce/APEX to keep us going along the way.  We have quite a few dependent picklists, which I understand are a bit tricky and our implementation seems much different than the other threads I've seen discussed on the Force.com boards.

 

I don't see any picklists mapped-out in APEX or Visualforce in our code, but I do see references in our Visualforce pages to a stored Yahoo User Interface archive, and the following items in the header of our (most customized) Visualforce page:

 

<apex:page id="pg" standardController="Case" extensions="CaseExtension"> <script type="text/javascript" src="{!URLFOR($Resource.yui,'yui/yahoo-min.js')}"></script> <script type="text/javascript" src="{!URLFOR($Resource.yui,'yui/event-min.js')}"></script> <script src="/static/013008/js/spch.js" type="text/javascript"></script> <script src="/servlet/servlet.picklist?h=2qV2A8XbaXzo8W5cJnASp%2FLOK6TB%2BPWiddh%2B5weChP8%3D&v=1223385679000&layout=00h40000001KlWp&l=1&record=012400000009WS0&pr=1.23&t=0" type="text/javascript"></script> <script type="text/javascript" src="/soap/ajax/13.0/connection.js" /> <script src="/static/013008/js/picklist.js" type="text/javascript"/> <script type="text/javascript"> <!-------------------------------------Prepare Dependent PickLists-------------------------------->

 

If I create a URL out of the "/servlet" source above, such as:
na2.salesforce.com/servlet/servlet.picklist?h=2qV2A8XbaXzo8W5cJnASp%2FLOK6TB%2BPWiddh%2B5weChP8%3D&v=1223385679000&layout=00h40000001KlWp&l=1&record=012400000009WS0&pr=1.23&t=0


I find my dependent picklist mappings!

 

Our question is -- we need to add new fields to the dependent picklist mappings, and those new fields aren't honoring the dependencies if when added to our Visualforce page (both in the 'prepare dependent picklists' section and adding new fields to the layout'.  So, how do we go about decoding the 'URL' above to put in the new dependent picklists? (Is it something to do with the 'layout' ID listed in the URL?)

 

Apologies if this should be posted to the 'Java' area...

 

Thanks!

jwetzlerjwetzler

I think you need to take a good look at those other threads.  What you are trying to do is totally not supported and is not going to work for you.

 

 Although dependent picklists are not automatically supported in Visualforce yet, it is not very difficult to implement them.  Using describe in Apex will give you access to your picklist values, and you can display your picklists and recreate the dependency by using apex: selectList, apex: selectOptions, and apex: actionSupport.

 

It is not appropriate to hack our URLs nor is it okay to directly reference our javascript files like you're doing with spch.js