AssignRequest Class
Applies To: Dynamics CRM 2015
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.
Namespace: Microsoft.Crm.Sdk.Messages
Assembly: Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)
Inheritance Hierarchy
System.Object
Microsoft.Xrm.Sdk.OrganizationRequest
Microsoft.Crm.Sdk.Messages.AssignRequest
Syntax
[DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class AssignRequest : OrganizationRequest
[DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")]
public ref class AssignRequest sealed : OrganizationRequest
[<Sealed>]
[<DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")>]
type AssignRequest =
class
inherit OrganizationRequest
end
<DataContractAttribute(Namespace := "https://schemas.microsoft.com/crm/2011/Contracts")>
Public NotInheritable Class AssignRequest
Inherits OrganizationRequest
Constructors
Name | Description | |
---|---|---|
AssignRequest() | Initializes a new instance of the AssignRequest class. |
Properties
Name | Description | |
---|---|---|
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 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.) |
|
Target | Gets or sets the target record to assign to another user or team. Required. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
Remarks
Important
This message request is deprecated. Consider using the UpdateRequest instead. For more information see Perform specialized operations using Update.
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 method, which returns an instance of the AssignResponse class.
Privileges and Access Rights
To perform this action, the caller must have privileges on the specified entity in the Target property and access rights on the specified record in the Target property. For a list of the required privileges, see Assign message privileges.
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 affect child records, see Cascading behavior.
Supported Entities
You can use this message to associate records of any two entities that participate in a relationship, including records for custom entities. You can find the default relationships listed in the Entity Metadata topic for each entity.
The following table shows the default entities that support this message. For the listed entities, the caller must be connected to the server for this message to be available.
Entity |
Availability |
---|---|
Account |
0 (Server) |
Annotation |
0 (Server) |
Appointment |
0 (Server) |
Campaign |
0 (Server) |
CampaignActivity |
0 (Server) |
CampaignResponse |
0 (Server) |
Connection |
0 (Server) |
Contact |
0 (Server) |
Contract |
0 (Server) |
ConvertRule |
0 (Server) |
CustomerOpportunityRole |
0 (Server) |
CustomerRelationship |
0 (Server) |
DuplicateRule |
0 (Server) |
0 (Server) |
|
EmailServerProfile |
0 (Server) |
Entitlement |
0 (Server) |
Fax |
0 (Server) |
Goal |
0 (Server) |
GoalRollupQuery |
0 (Server) |
ImportFile |
0 (Server) |
ImportMap |
0 (Server) |
Incident |
0 (Server) |
IncidentResolution |
0 (Server) |
Invoice |
0 (Server) |
Lead |
0 (Server) |
Letter |
0 (Server) |
List |
0 (Server) |
Mailbox |
0 (Server) |
MailMergeTemplate |
0 (Server) |
msdyn_PostAlbum |
0 (Server) |
msdyn_wallsavedqueryusersettings |
0 (Server) |
Opportunity |
0 (Server) |
OpportunityClose |
0 (Server) |
OrderClose |
0 (Server) |
PhoneCall |
0 (Server) |
ProcessSession |
0 (Server) |
Queue |
0 (Server) |
Quote |
0 (Server) |
QuoteClose |
0 (Server) |
RecurringAppointmentMaster |
0 (Server) |
Report |
0 (Server) |
RoutingRule |
0 (Server) |
SalesOrder |
0 (Server) |
ServiceAppointment |
0 (Server) |
SharePointDocumentLocation |
0 (Server) |
SharePointSite |
0 (Server) |
SLA |
0 (Server) |
SLAKPIInstance |
0 (Server) |
SocialActivity |
0 (Server) |
SocialProfile |
0 (Server) |
Task |
0 (Server) |
Template |
0 (Server) |
UserForm |
0 (Server) |
UserQuery |
0 (Server) |
UserQueryVisualization |
0 (Server) |
Workflow |
0 (Server) |
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.
// Create the Request Object and Set the Request Object's Properties
AssignRequest assign = new AssignRequest
{
Assignee = new EntityReference(SystemUser.EntityLogicalName,
_otherUserId),
Target = new EntityReference(Account.EntityLogicalName,
_accountId)
};
// Execute the Request
_service.Execute(assign);
Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
AssignResponse
Microsoft.Crm.Sdk.Messages Namespace
Actions on entity records
Entity ownership
Sample: Assign a record to a new owner
Sample: Assign a record to a team
Return to top
© 2016 Microsoft. All rights reserved. Copyright