Compartilhar via


RetrieveTimestampRequest Class

Definition

Contains the data that is needed to retrieves a time stamp for the metadata.

public ref class RetrieveTimestampRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")]
public sealed class RetrieveTimestampRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")>]
type RetrieveTimestampRequest = class
    inherit OrganizationRequest
Public NotInheritable Class RetrieveTimestampRequest
Inherits OrganizationRequest
Inheritance
RetrieveTimestampRequest
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 instance.

/// <summary>
/// Retrieves the current metadata timestamp
/// </summary>
/// <param name="service">Authenticated IOrganizationService instance</param>
/// <returns>The timestamp value</returns>
static string RetrieveTimestamp(IOrganizationService service) {

   RetrieveTimestampRequest request = new();
   var response = (RetrieveTimestampResponse)service.Execute(request);
   return response.Timestamp;
}         

The value returned may look like this: 99033537.

Remarks

For the Web API use the RetrieveTimestamp function.

Usage

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

Privileges and Access Rights

No special privileges or access rights are required to perform this action.

Notes for Callers

Execute this message before you retrieve metadata. You can repeat this process later to see if the metadata has changed in the intervening time. If the value is the same, the metadata has not changed. If the value is different, you retrieve the metadata again to get the updated values.

Constructors

RetrieveTimestampRequest()

Initializes a new instance of the RetrieveTimestampRequest 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