RetrieveOptionSetRequest Class
Updated: November 29, 2016
Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online
Contains the data that is needed to retrieve a global option set.
Assembly: Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)
Microsoft.Xrm.Sdk.OrganizationRequest
Microsoft.Xrm.Sdk.Messages.RetrieveOptionSetRequest
| Name | Description | |
|---|---|---|
![]() | RetrieveOptionSetRequest() | Initializes a new instance of the RetrieveOptionSetRequest class |
| Name | Description | |
|---|---|---|
![]() | ExtensionData | Gets or sets the structure that contains extra data. Optional.(Inherited from OrganizationRequest.) |
![]() | Item[String] | Gets or sets the indexer for the Parameters collection.(Inherited from OrganizationRequest.) |
![]() | MetadataId | Gets or sets the MetadataId of the OptionSetMetadata to be retrieved. Optional. |
![]() | Name | Gets or sets the name for the global option set to be retrieved. Optional. |
![]() | Parameters | Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.) |
![]() | RequestId | Gets or sets the ID of an asynchronous operation (system job). Optional. (Inherited from OrganizationRequest.) |
![]() | RequestName | Gets or sets the name of the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.) |
![]() | RetrieveAsIfPublished | Gets or sets whether to retrieve the metadata that has not been published. Required. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | ToString() | (Inherited from Object.) |
Message Availability
This message works regardless whether the caller is connected to the server or offline.
Usage
Pass an instance of this class to the Execute method, which returns an instance of RetrieveOptionSetResponse.
Privileges and Access Rights
To perform this action, the caller must have privileges listed in RetrieveOptionSet message privileges.
Notes for Callers
The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.
// Use the RetrieveOptionSetRequest message to retrieve // a global option set by it's name. RetrieveOptionSetRequest retrieveOptionSetRequest = new RetrieveOptionSetRequest { Name = _globalOptionSetName }; // Execute the request. RetrieveOptionSetResponse retrieveOptionSetResponse = (RetrieveOptionSetResponse)_serviceProxy.Execute( retrieveOptionSetRequest); Console.WriteLine("Retrieved {0}.", retrieveOptionSetRequest.Name); // Access the retrieved OptionSetMetadata. OptionSetMetadata retrievedOptionSetMetadata = (OptionSetMetadata)retrieveOptionSetResponse.OptionSetMetadata; // Get the current options list for the retrieved attribute. OptionMetadata[] optionList = retrievedOptionSetMetadata.Options.ToArray();
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Microsoft Dynamics 365
© 2016 Microsoft. All rights reserved. Copyright

