You need to sign in to do that
Don't have an account?
roktechie
Getting picklist values via describe call with AJAX toolkit
I am having a lot of trouble getting this to work. The web services API docs say that field.picklistValues should return a PickListEntry array. However, it appears that field.picklistValues has no properties. Here is my full example. Can anyone point out what I am doing wrong? Thanks.
Code:
Code:
logDebug("---------- fields ---------"); for (var i=0; i<result.fields.length; i++) { var field = result.fields[i]; logDebug(field.name + " : " + field.label + " : " + field.length + " : "); logDebug("-------------- picklist values --------"); for (var x=0; x<5; x++) { var picklistValue = field.picklistValues[x]; logDebug(picklistValue.label); } }
picklistValues:{active:'true',
defaultValue:'false', label:'NIPS', value:'NIPS', },{active:'true',
defaultValue:'false', label:'HIPS', value:'HIPS', },{active:'true',
defaultValue:'false', label:'VA', value:'VA', },{active:'true',
defaultValue:'false', label:'MFW', value:'MFW', },
How do I use this array item? It doesn't appear to be another array. Do I need to run getArray on the picklistValues?