+ Start a Discussion
don.mink.magnet360don.mink.magnet360 

/servlet/servlet.picklist and /js/picklist.js

We're utilizing the describeSObject and describeLayout functions of the API to dynamically retrieve and generate page layouts for many different objects (e.g. user wishes to quickly create an Account, Contact, Opportunity in one screen).  However, I'd like to not have to recreate the wheel and have to retrieve valid picklist values for a specific record type/page layout when it seems the functionality already exists in salesforce.com via including /js/picklist.js and then including /servlet/servlet.picklist (with additional parameters).

I can see the src for /js/picklist.js so I can figure out how to utilize the functions inside; however, I cannot see what params are required (or even what they mean) for the /servlet/servlet.picklist servlet (which generates arrays of picklist values when a record type id and page layout are specified).  Additional parameters to the /servlet/servlet.picklist call include...

These values seem to be required and I know what they mean:
record = <record type id>
layout = <layout id>

This value seems to be required but I do not know what it means (although any value works):
v = <?>

These values do not seem to be required but I do not know what they mean:
h =  <?>
t = <?>
l = <?>
pr = <?>

This would save us lots of development time in not requiring developers to sift through the describe results but rather pass in values to the functions/servlet.  Any docs or examples would be extremely helpful and appreciated - thank you!
michaelforcemichaelforce
That's an excellent question, which I am afraid is over my head... but I'm thinking that in the event you can't use salesforce's functions... you could build a 'snippet' once to fetch picklist values and then include / call it in future code, no?
BillHansonBillHanson
Did you ever discover how to properly utilize picklist.js and the servlet?  I'm looking at the same decision (creating my own picklist cache or using the existing code).