CrmCalloutBase.PostAssign Method

banner art

Specifies a method called after an assign operation.

Syntax

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

Parameters

userContext

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

entityContext

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

preImageEntityXml

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

postImageEntityXml

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

Return Value

No return value.

Remarks

This method is called after an assign operation.

Example

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

public override void PostAssign(CalloutUserContext userContext,
                         CalloutEntityContext entityContext,
                         string preImageEntityXml,
                         string postImageEntityXml)
{
   TextWriter log = TextWriter.Synchronized(
     File.AppendText(@"C:\CRM_SDK_Drop\Assign.txt"));
   log.WriteLine("PostAssign");
   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.