CrmCalloutBase.PostDelete Method

banner art

Specifies a method called after a delete operation.

Syntax

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

Parameters

userContext

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

entityContext

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

preImageEntityXml

An XML string that describes the entity before the delete 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 deletion using a post-callout.

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