CrmServiceClient.CreateEntityAssociation Method
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.
Associates one Entity to another where an M2M Relationship Exists.
public bool CreateEntityAssociation (string entityName1, Guid entity1Id, string entityName2, Guid entity2Id, string relationshipName, Guid batchId = default);
member this.CreateEntityAssociation : string * Guid * string * Guid * string * Guid -> bool
Public Function CreateEntityAssociation (entityName1 As String, entity1Id As Guid, entityName2 As String, entity2Id As Guid, relationshipName As String, Optional batchId As Guid = Nothing) As Boolean
Parameters
- entityName1
- String
Entity on one side of the relationship
- entity1Id
- Guid
The Id of the record on the first side of the relationship
- entityName2
- String
Entity on the second side of the relationship
- entity2Id
- Guid
The Id of the record on the second side of the relationship
- relationshipName
- String
Relationship name between the 2 entities
- batchId
- Guid
Optional: if set to a valid GUID, generated by the Create Batch Request Method, will assigned the request to the batch for later execution, on fail, runs the request immediately
Returns
true on success, false on fail