Monday, November 23, 2009

Showing Append-Only Note Field values in DataFormWebPart

So, it seemed pretty straight forward, there's an object in the Microsoft.SharePoint.WebControls library called AppendOnlyHistory to get the whole list of comments from item versioning.  All you had to do was throw this line into the XSL and it worked:

Well, here's the rub I found.  My reference to that library had the prefix tag of "SharePointWebControls."  That's probably because it's in a Publishing site and so it give it a more descriptive name.  Anyway, I was using that prefix and kept getting errors.  Namely the "Object reference not set to the instance of an object" error.

I don't really see why changing the prefix from "SharePointWebControls" to "SharePoint" fixed it, but it did. 

NOTE: You'll have to change everything with that prefix, so do a "replace all" or many things will break.

TANGENT: I don't know why I continue to post to MSDN Forums.  I almost always answer my own questions when I do.  I just keep going back in hopes something will change.  I really need to stop.  Is there some type of 12 step program to quit bad forums (BFA: Bad Forums Anonymous)?

No comments:

Post a Comment