RetrieveOptionSetRequest RetrieveOptionSetRequest RetrieveOptionSetRequest RetrieveOptionSetRequest Class

Definition

Contains the data that is needed to retrieve a global option set.

public ref class RetrieveOptionSetRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")]
public sealed class RetrieveOptionSetRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type RetrieveOptionSetRequest = class
    inherit OrganizationRequest
Public NotInheritable Class RetrieveOptionSetRequest
Inherits OrganizationRequest
Inheritance
RetrieveOptionSetRequestRetrieveOptionSetRequestRetrieveOptionSetRequestRetrieveOptionSetRequest
Attributes

Examples

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.

// 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)svc.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();

Remarks

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(OrganizationRequest) 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

Constructors

RetrieveOptionSetRequest() RetrieveOptionSetRequest() RetrieveOptionSetRequest() RetrieveOptionSetRequest()

Initializes a new instance of the RetrieveOptionSetRequest class

Properties

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String] Item[String] Item[String] Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
MetadataId MetadataId MetadataId MetadataId

Gets or sets the MetadataId of the OptionSetMetadata to be retrieved. Optional.

Name Name Name Name

Gets or sets the name for the global option set to be retrieved. Optional.

Parameters Parameters Parameters Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RequestId RequestId RequestId RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional.

(Inherited from OrganizationRequest)
RequestName RequestName RequestName RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RetrieveAsIfPublished RetrieveAsIfPublished RetrieveAsIfPublished RetrieveAsIfPublished

Gets or sets whether to retrieve the metadata that has not been published. Required.

Applies to