Export (0) Print
Expand All

SPAudit.WriteAuditEvent method (SPWeb, String, SPAuditItemType, SPAuditEventType, String, String, String)

Writes an unrestricted volume of data to the audit history in the SharePoint database.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static bool WriteAuditEvent(
	SPWeb web,
	string serverRelativeUrl,
	SPAuditItemType itemType,
	SPAuditEventType eventId,
	string eventName,
	string eventSource,
	string xmlData
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb

The Web associated with the event.

serverRelativeUrl
Type: System.String

The path of the item associated with the event.

itemType
Type: Microsoft.SharePoint.SPAuditItemType

The type of the item associated with the event.

eventId
Type: Microsoft.SharePoint.SPAuditEventType

The event type of the record.

eventName
Type: System.String

The name of the event (used if eventId is a custom event).

eventSource
Type: System.String

The source of the event. This parameter is optional.

xmlData
Type: System.String

The information about the event.

Return value

Type: System.Boolean
true if the event was recorded successfully; otherwise, false.
Show:
© 2014 Microsoft