SharePoint Document Library item title in Event Receiver AfterProperties

January 4th, 2010 | Categories: C#, SharePoint | Tags: , ,

Here’s a short one worth taking note of. If you’re using SharePoint Event Receivers – more specifically synchronous event receivers (-ing) you might notice that if you try to set Properties.AfterProperties["Title"] in a document library for the strangest reason it doesn’t work. If that occurs, use the

AfterProperties["vti_title"]

And the Document Title can be managed.

  1. david wei
    February 18th, 2010 at 02:19
    Reply | Quote | #1

    Awesome! it’s took me half day to address the exact same issue. you just saved my time!
    Thanks a lot!

  2. Chris Walker
    March 15th, 2010 at 15:34
    Reply | Quote | #2

    This seems to cause issues when updating in Datasheet mode.

  3. Boris Gomiunik
    March 16th, 2010 at 09:20
    Reply | Quote | #3

    When updating in DataSheet mode, only fields that are displayed in the DataSheet view get submitted. So if you’re refferencing any columns in your event receiver that are not part of this column, that’s when the error occurs.