Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Save metadata of Docuemnt Library using event handler

  Asked By: Patrick    Date: Jan 02    Category: Sharepoint    Views: 1849

In Sharepoint document Library event handler i want to catch the metadata
value of the event before changing and after changing and store in SQL table
on Update Event of document library.,
how can i do this using event handler programmatically??



1 Answer Found

Answer #1    Answered By: Aastha Patel     Answered On: Jan 02

Public Sub OnEvent(ByVal listEvent As Microsoft.SharePoint.SPListEvent)
Implements Microsoft.SharePoint.IListEventSink.OnEvent

Select Case listEvent.Type

Case SPListEventType.CheckIn

'Perform necessary actions for the CheckIn event

Case SPListEventType.CheckOut

'Perform necessary actions for the CheckOut event

sLog += checkoutText

'EventLog.WriteEntry("Facilities event  Log ", sLog,
EventLogEntryType.Information, listEvent.Type)

Case SPListEventType.Copy

'Perform necessary actions for the Copy event

Case SPListEventType.Delete

'Perform necessary actions for the Delete event

Case SPListEventType.Insert

'Perform necessary actions for the Insert event

Case SPListEventType.Invalid

'Perform necessary actions for the Invalid event

Case SPListEventType.Move

'Perform necessary actions for the Move event

Case SPListEventType.UncheckOut

'Perform necessary actions for the UnCheckOut event

Case SPListEventType.Update

'Perform necessary actions for the Update event

End Select

Didn't find what you were looking for? Find more on Save metadata of Docuemnt Library using event handler Or get search suggestion and latest updates.