0

I have implemented ItemAdded event on Discussion board

public override void ItemAdded(SPItemEventProperties properties)

when added Reply for particular post I need to read metadata value of its parent list item. For eg: CustomColumn is ForumCategory and value is ".NET", so I need to get its value when any reply is added under this categoty.

I wrote below

if(properties.ListItem.ContentType.Name == "Message")
{
//how to read its parent item's column's value
}

I will use this in sending mail that a new reply is added under category ".NET"

4

1 回答 1

1

The ID of the parent of the message is stored in a field with the display name "Parent Folder Id". So you need to grab that field and then filter your items with that Parent Folder ID.

So for example, if your ".NET" item is having an id of 1 then Parent Folder Id will have a value of 1 for your message. and then you need to filter it.

于 2017-05-22T10:33:25.243 回答