Vivos et Securus: Adepto de SPFolder SPListItem in eventum Receptor

Odi illud admittere,, but I struggled with this one all day. My event receiver needs to update a field of its parent folder. This little bit shows how to do it:

privatis Irrita UpdateParentFolder(SPItemEventProperties Proprietates)
{

SPFolder thisItemFolder = properties.ListItem.File.ParentFolder;
thisItemFolder.Item["ZZ Approval Status"] = "Good news, omnes!";
thisItemFolder.Item.Update();


} // UpdateParentFolder

In hoc, Ego sum operantes cum a tabellae bibliothecam proprietates veniunt ab eventu ItemAdded.

Dolum est, ut non directe item Lorem ipsum SPFolder (i.e. properties.ListItem.Folder nulla sit). Pro, item in album scriptor ire et adepto coniuncta File lima folder est scriptor.

</finem>

Scribet ad mea blog!

Technorati Tags:

Cogitavi in ​​unum "Vivos et Securus: Adepto de SPFolder SPListItem in eventum Receptor

Aliquam

Tua inscriptio electronica non editis. Velit sunt insignis *