IManDocument.Name is Empty After Casting From IManContent

Has anyone else had issues converting IManContent objects to IManDocument objects?

Sample snippet below shows that I get a total of 97 content items in a folder. As I loop through the collection (which are all Word docs), I convert the IManContent objects to IManDocument objects, without any errors, but the Name property is blank.

IManFolder selFolder = fldrRootClientMatter.SubFolders.ItemByIndex(0);
int intTotal = selFolder.Contents.Count; //97 files is shown when debugging, this matches the view in WorkSite

foreach (IManContent con in selFolder.Contents)
{

try
{
string strObjectId = con.ObjectID; // debugging shows the object id for each - ex: "!nrtdms:0:!session:serverName:!database:dbName:!document:160889573,1:"

IManDocument doc = (IManDocument) con;
string docName = doc.Name; //this is always empty, but an error isn't thrown
}
catch (Exception ex)
{
lblStatus.Text = ex.Message;
}

}

Comments

TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs