CrmCalloutBase.PostMerge Method

banner art

Specifies a method called after a merge operation.

Syntax

[Visual Basic .NET]
Overridable Public Sub PostMerge(
  ByVal userContext As CalloutUserContext,
  ByVal entityContext As CalloutEntityContext,
  ByVal preImageMasterEntityXml As String,
  ByVal preImageSubordinateEntityXml As String,
  ByVal postImageMasterEntityXml As String
)
[C#]
public virtual void PostMerge(
  CalloutUserContext  userContext,
  CalloutEntityContext  entityContext,
  string  preImageMasterEntityXml,
  string  preImageSubordinateEntityXml,
  string  postImageMasterEntityXml
);
[JScript]
public virtual function PostMerge(
  userContext : CalloutUserContext,
  entityContext : CalloutEntityContext,
  preImageMasterEntityXml : String,
  preImageSubordinateEntityXml : String,
  postImageMasterEntityXml : String
);

Parameters

userContext

Contains information about the user who performed the merge operation. See CalloutUserContext.

entityContext

Contains information about the entity on which the merge operation was performed. See CalloutEntityContext.

preImageMasterEntityXml

An XML string that describes the master (merge to) entity before the merge operation was performed. This is a serialized version of DynamicEntity.

preImageSubordinateEntityXml

An XML string that describes the subordinate (merge from) entity before the merge operation was performed. This is a serialized version of DynamicEntity.

postImageMasterEntityXml

An XML string that describes the entity after the merge operation was performed. This is a serialized version of DynamicEntity.

Return Value

No return value.

Example

The following code example shows how to log an object merge using a post-callout.

public override void PostMerge(CalloutUserContext userContext,
                        CalloutEntityContext entityContext,
                        string preImageMasterEntityXml,
                        string preImageSubordinateEntityXml,
                        string postImageMasterEntityXml)
{
   TextWriter log =TextWriter.Synchronized(
     File.AppendText(@"C:\CRM_SDK_Drop\Merge.txt"));
   log.WriteLine("PostMerge");
   log.WriteLine("ObjectType: " + 
     entityContext.EntityTypeCode.ToString());
   log.WriteLine("ObjectId: " + entityContext.InstanceId.ToString());
   log.WriteLine("CreatorId: " + userContext.UserId.ToString());
   log.WriteLine();
   log.Close();
}

Requirements

Namespace: Microsoft.Crm.Callout

Assembly: microsoft.crm.platform.callout.base.dll

See Also

© 2007 Microsoft Corporation. All rights reserved.