I'm developping a winform application in c# using the .net webservices and I'm having trouble getting a category field over a "DocumentManagement.Version" object.
I had success getting those custom category fields on a "Node" object with this code:
try
{
if (aNode.Metadata.AttributeGroups != null)
{
// Look in the custom field
foreach (AttributeGroup attribute in aNode.Metadata.AttributeGroups)
{
if (attribute.DisplayName.Contains("CategoryName")) // For a custom field named "CategoryName"
theOldCreationDate = ((DateValue)attribute.Values[2]).Values[0].Value.ToString("yyyy/MM/dd HH:mm"); // Get the old creation date
}
}
}
catch (Exception e)
{
//ErrorHandler.Handle(e, "");
}
Unfortunately, this is not working with a version object since the Metadata property always returns null. If I go in Livelink, I can see that the category exists for the specific version, but can't access it over the webservice in any way.
Any idea how to do it and what's the best practice?