I'm looking for a solution to get the (BluePrint) parent of a Publication based on its TCM URI, could you help me ?
1 Answer
Just use the Core Service Read
method, to read in the data of a Publication, and check its Parents
property:
var pubData = (PublicationData)client.Read("tcm:0-6-1", new ReadOptions());
foreach (var parent in pubData.Parents)
{
string parentUri = parent.IdRef;
}
Please note there can be multiple BluePrint parents for a Publication. You can find the Core Service API guide for 2011 on http://sdltridionworld.com under downloads/documentation/SDLTridion2011
(requires login)