-1

While I am going to delete keyword using core service, I am getting below error. Error : unable to delete this item. the item is in use. So,We must delete old versions of component which are being used by the keyword. Can you please suggest me how to fetch old versions of components in which the keyword was used and delete old versions which are being used by the keyword using core service. I am able to fetch all versions of component. I am not able to fetch only old versions which are being used by the keyword.

0

2 Answers 2

1

You may try using the VersionFilterData and that may do the trick:

VersionsFilterData versionFilter = new VersionsFilterData();
XElement versions= client.GetListXml("<TCM URI>", versionFilter);
foreach (var version in versions.Descendants())
{
    var versionID = version.Attribute("ID");
}
1

If you use the GetList method with UsingItemsFilterData, you will get all versions of other versioned items which are using the Keyword you specify as subject.

Not the answer you're looking for? Browse other questions tagged or ask your own question.