ValidateRequest 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 verify that an appointment or service appointment (service activity) has valid available resources for the activity, duration, and site, as appropriate.
For the Web API use the Validate Action.
Assembly: Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)
| Name | Description | |
|---|---|---|
![]() | ValidateRequest() | Initializes a new instance of the ValidateRequest class. |
| Name | Description | |
|---|---|---|
![]() | Activities | Gets or sets the activities to validate. |
![]() | 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 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.) |
| 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 the ValidateResponse class.
Privileges and Access Rights
To perform this action, the caller must have access rights on the specified entities in the Activities property. For a list of the required privileges for this message, see Validate message privileges.
For the Web API use the RenewContract Action.
For the Web API use the RenewContract Action.
Each activity record in the Activities property must have a valid Guid value for Id.
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.
// Retrieve the appointment to be validated ColumnSet cols = new ColumnSet("scheduledstart", "scheduledend", "statecode", "statuscode"); Appointment retrievedAppointment = (Appointment)_serviceProxy.Retrieve(Appointment.EntityLogicalName, _appointmentId, cols); // Use the Validate message ValidateRequest validatedReq = new ValidateRequest(); validatedReq.Activities = new EntityCollection(); validatedReq.Activities.Entities.Add(retrievedAppointment); validatedReq.Activities.MoreRecords = false; validatedReq.Activities.PagingCookie = ""; validatedReq.Activities.EntityName = Appointment.EntityLogicalName; ValidateResponse validateResp = (ValidateResponse)_serviceProxy.Execute(validatedReq); // Verify success if ((validateResp.Result != null) && (validateResp.Result.Length > 0)) { Console.WriteLine("Validated the appointment."); }
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

