/
Picklist Information
Picklist Information
Layout Operations
getPicklist
var request = { "type" : "getPicklist", "object" : "Account", "data" : { "RecordTypeId" : "001234567891234", // optional "SomeControllingField" : "someValue" // optional, data to set primary field(s) for dependent picklist }, "fieldName" : "type" // required }; bridge.sendRequest(request, function (results) { if (results.type === "picklistResponse") { var picklistValues = results.data.itemIds; // returns an array of the valid salesforce picklist values var picklistLabels = results.data.itemLabels; // returns an array of the valid salesforce picklist labels } else if (results.type == 'error') { errStr = results.data; alert('A problem occurred:\n' + errStr); } });
getUnfilteredPicklist
var request = { "type" : "getUnfilteredPicklist", "object" : "Account", "data" : { "RecordTypeId" : "001234567891234" }, // data to describe the type of object "fieldName" : "type" // required }; bridge.sendRequest(request, function (results) { if (results.type === "picklistResponse") { var picklistValues = results.data.itemIds; // returns an array of all salesforce picklist values var picklistLabels = results.data.itemLabels; // returns an array of all salesforce picklist labels } else if (results.type == 'error') { errStr = results.data; alert('A problem occurred:\n' + errStr); } });
Related content
Object Layout Information
Object Layout Information
More like this
Compact Layout Information
Compact Layout Information
More like this
Things to consider when querying for the picklist via JSAPI
Things to consider when querying for the picklist via JSAPI
More like this
Best Practices for System Admins
Best Practices for System Admins
More like this