CloneContractRequest Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains the data that is needed to copy an existing contract and its line items.
For the Web API use the CloneContract Action.
public ref class CloneContractRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class CloneContractRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")>]
type CloneContractRequest = class
inherit OrganizationRequest
Public NotInheritable Class CloneContractRequest
Inherits OrganizationRequest
- Inheritance
- 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. For the complete sample, see the link later in this topic.
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 CloneContractResponse.
Privileges and Access Rights
To perform this action, the caller must have privileges on the Contract entity and access rights on the record specified in the ContractId property. For a complete list of the required privileges, see CloneContract message privileges.
Notes for Callers
By default the caller will become the owner for the new record. For this to work, the caller must have both Create and Read privileges for the contract entity. For more information, see Privileges by entity. Alternatively, you can set the ownerid property to the ID of another user.
Constructors
| CloneContractRequest() |
Initializes a new instance of the CloneContractRequest class. |
Properties
| ContractId |
Gets or sets the ID of the contract to be copied. Required. |
| ExtensionData |
Gets or sets the structure that contains extra data. Optional. (Inherited from OrganizationRequest) |
| IncludeCanceledLines |
Gets or sets a value that indicates whether the canceled line items of the originating contract are to be included in the copy (clone). Required. |
| Item[String] |
Gets or sets the indexer for the |
| 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) |