Freigeben über


RetrieveVersionRequest Class

Definition

Contains the data that is needed to retrieve the Dataverse version number.

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

Examples

The following example shows how to use this message. For this sample to work correctly, you must have an authenticated connection to the server with a client that implements the IOrganizationService interface instance.

/// <summary>
/// Writes the current Dataverse version to the console
/// </summary>
/// <param name="service">Authenticated client implementing the IOrganizationService interface</param>
public static void OutputVersion(IOrganizationService service) { 

    var request = new RetrieveVersionRequest();
    var response = (RetrieveVersionResponse)service.Execute(request);

    Console.WriteLine($"Version:{response.Version}");
}      

Example Output:

Version:9.2.23033.220      

Remarks

For the Web API use the RetrieveVersion function.

Usage

Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of the RetrieveVersionResponse class.

Privileges and Access Rights

There are no special privileges or access rights required to use this message.

Constructors

RetrieveVersionRequest()

Initializes a new instance of the RetrieveVersionRequest class.

Properties

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)
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 the request. Optional.

(Inherited from OrganizationRequest)
RequestName

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

(Inherited from OrganizationRequest)

Applies to

See also