ConvertDateAndTimeBehaviorRequest ConvertDateAndTimeBehaviorRequest ConvertDateAndTimeBehaviorRequest ConvertDateAndTimeBehaviorRequest Class

Definition

Contains the data to convert existing UTC date and time values in the database to DateOnly values.

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


ConvertDateAndTimeBehaviorRequest request = new ConvertDateAndTimeBehaviorRequest()
        {
        Attributes = new EntityAttributeCollection()
        {
        new KeyValuePair<string, StringCollection="">("account", new StringCollection() 
                { "new_sampledatetimeattribute" }) 
            },
    ConversionRule = DateTimeBehaviorConversionRule.SpecificTimeZone.Value,
    TimeZoneCode = 190, // Time zone code for India Standard Time (IST) in CRM
    AutoConvert = false // Conversion must be done using ConversionRule
};

// Execute the request ConvertDateAndTimeBehaviorResponse response = (ConvertDateAndTimeBehaviorResponse)_serviceProxy.Execute(request);

Remarks

Message Availability

For this message to work, the caller must be connected to the server.

Usage

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

Privileges and Access Rights

To perform this action, the caller must have the System Administrator role.

Notes to Caller

This message is available for Microsoft Dynamics CRM Online 2015 Update 1 only.

Constructors

ConvertDateAndTimeBehaviorRequest() ConvertDateAndTimeBehaviorRequest() ConvertDateAndTimeBehaviorRequest() ConvertDateAndTimeBehaviorRequest()

Initializes a new instance of the ConvertDateAndTimeBehaviorRequest class.

Properties

Attributes Attributes Attributes Attributes

Gets or sets a collection of entity and attributes to apply the behavior conversion on. Required

AutoConvert AutoConvert AutoConvert AutoConvert

Gets or sets whether to automatically convert to DateOnly value, if possible. Optional.

ConversionRule ConversionRule ConversionRule ConversionRule

Gets or sets the conversion rule to apply. Required.

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)
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)
TimeZoneCode TimeZoneCode TimeZoneCode TimeZoneCode

Gets or sets the CRM time zone code to be used for the conversion. Required only if SpecificTimeZone is specified in ConversionRule parameter.

Applies to