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); } });