-
Notifications
You must be signed in to change notification settings - Fork 24
MobileCRM.Metadata.getOptionSetValues
rescocrm edited this page May 15, 2023
·
9 revisions
Asynchronously gets the list of values for given CRM OptionSet.
| Argument | Type | Description |
|---|---|---|
| entityName | String | The entity name. |
| optionSetName | String | The OptionSet name. |
| callback | function(optionSetValues) | The callback function that is called asynchronously with option set values object as argument. |
| errorCallback | function(errorMsg) | The errorCallback which is called in case of error. |
| scope | Object | The scope for callbacks. |
This example demonstrates how to get list of values for the OptionSet field opportunity.statuscode (normally, "In Progress = 1, On Hold = 2, Won = 3, Canceled = 4, Out-Sold = 5").
MobileCRM.Metadata.getOptionSetValues("opportunity", "statuscode", function (optionSetValues) {
/// <param name="optionSetValues" type="Object"></param>
var values = "";
for (var name in optionSetValues) {
var val = optionSetValues[name];
values += name + " = " + val + "\n";
}
MobileCRM.bridge.alert("Opportunity option set values: \n\n" + values);
}, MobileCRM.bridge.alert, null);