Koen’s Weblog

SharePoint developer with a life!

Posts Tagged ‘AfterProperties’

Getting the values of the AfterProperties of an event

Posted by koenvosters on July 30, 2009

As I was having some troubles with a different behavior between Development and Acceptance (AfterProperties["FieldName"] was giving errors in Acceptance but not in Development) I had to figure out a way on how to display the values in the AfterProperties.  In the end, I came up with this, which requires you to add ”using System.Collections;”

foreach (DictionaryEntry de in properties.AfterProperties)
            {
                EventLog.WriteEntry(
“MOSS 2007 Test Properties”“key:” + de.Key + “- value:” + de.Value);
            
}

Posted in Development, SharePoint 2007 | Tagged: , , | Leave a Comment »