Is there a way, without additional programming, to get history of children related items to the parent one, for example:
SPList threads = SPContext.Current.Web.Lists["Blog threads"];
SPList posts = SPContext.Current.Web.Lists["Blog posts"];
posts have lookup field - threads, of course. Looking into the selected thread history I wish to know when a post was added it it, when was deleted or which changed.
I know I can iterate throug all items related:
SPList posts = SPContext.Current.Web.Lists["Blog posts"];
SPQuery spQuery = new SPQuery();
spQuery.Query =
"<Where><Eq><FieldRef Name='Thread' LookupId='true' /><Value Type='Lookup'>" + threadId +
"</Value></Eq></Where>";
SPListItemCollection listItemCollection = posts.GetItems(spQuery);
foreach (SPListItem spListItem in listItemCollection)
{
string historyUrl = "/_layouts/Versions.aspx?list={" + posts.ID + "}&ID=" + spListItem.ID";
...
}
But I won't have info about deleted, changed items.
To summarize: I need a history of an item with all realated child items from other lists. (SharePoint 2010 if it matters)