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