Condividi tramite


AssignRequest Class

Definition

Contains the data that is needed to assign the specified record to a new owner (user or team) by changing the OwnerId attribute of the record.

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

Remarks

This message request is deprecated. Use the the UpdateRequest instead. For more information see Legacy update messages.

Usage

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

Privileges and Access Rights

To perform this action, the caller must have Assign privileges on the specified table in the Target property and access rights on the specified record in the Target property. Each table that supports this message has an prvAssign<Table Schema Name> privilege that callers must have. For example, with the Account table, the privilege name is prvAssignAccount. Learn more about how to verify access with code.

Notes for Callers

This action applies to the parent record and the associated records that have the same owner as the parent record. Therefore, when you assign the parent record to a new owner, only the associated records that have the same owner as the parent record are also assigned.

If the value of the Organization.ShareToPreviousOwnerOnAssign attribute is true, when a record is assigned to a new owner, it is shared with the previous owner with full rights. In this case, either the new owner or the previous owner can remove the relationship or lower the level of privileges that the previous owner has on the record.

For a description of how actions on a parent record can affect related records, see Configure table relationship cascading behavior.

Supported Tables

You can use this for tables that are user-owned. They will have an ownerid property and the EntityMetadata.OwnershipType value will be UserOwned.

Constructors

AssignRequest()

Initializes a new instance of the AssignRequest class.

Properties

Assignee

Gets or sets the user or team for which you want to assign a record. Required.

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

Gets or sets the target record to assign to another user or team. Required.

Applies to

See also