SPEventReceiver Updating SPDocumentLibrary

142 views Asked by At

I my scenario I have an InfoPath form being updated in a document library. There is a field in the InfoPath form which can be edited by the user and needs to be used to set a "Title" field of the ListItem in the Document Library.

I had expected I'd be able to use the Before and After properties to look at the updated InfoPath document and decide what to set the field to but I can't figure out how to access the updated SPFile object from an Updating event. Thats the crux. I know I can access this in the Updated event but it's critical to what I'm trying to achieve that this is done in the Updating event as I need to redirect the correct URL as the title of the document has changed.

Any help would be very welcome.

1

There are 1 answers

0
Sebastian 506563 On

I dont know that I get you right, but If you want to just update sharepoint column value by value from infopath then microsoft gave you OOTB that allows you map the infopath fields with columns.

Here you have some simple vide that shows how to do it:

Promote InfoPath field to SharePoint column