Announcements
Hi,
I found the following piece of code, and I'm trying to find out what the int 1 and 2 (passed as parameters of OptionSetValue() ) stand for
var newRequest = new SetStateRequest(); var newEntityMoniker = newRequest.EntityMoniker(); newEntityMoniker = new EntiyReference() { Id = myEntity.Id; LogicalName = myEntity.LogicalName; } newEntityMoniker.State = new OptionSetValue(1); newEntityMoniker.Status = new OptionSetValue(2);
In this documentation, which explains the SetStateRequest class, I found an example of use of OptionSetValue but it doesn't use an int value as a parameter.
What does the instructions above mean, and where can I find some references about this usage of OptionSetValue()?
Hi,
The case of status remains an exceptional case. The labels/values can be found via the stringMap table. Indeed, this table contains the label/value choices. You will find on this link all default values of status/status reason: https://www.tpein.dk/?page_id=210
For an ordinary option set field, you will be able to see the values of the options set, and you can also modify them:
Hi Mehdi,
Where can I find the labels for the Opportunity statecode field values?
I opened the Status field properties for the Opportunity entity, but I onlu see these four labels: Auto, Inactive, active, disabled
Hi Joel,
A choice of an optionSet field is defined by a label + a value.
For example, a "Won" opportunity is defined as: statecode field value of the opportunity is 1.
Updating an optionset field means updating its value (a numeric) not its label.
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156