Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
IManDocument.Name is Empty After Casting From IManContent
WendyA
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;
}
}
Find more posts tagged with
Comments
WendyA
It appears that we do not use IManDocument.Name in our environment. We use IManDocument.Description.
Migrateduser
As does everyone else, it's one of the more "entertaining" gotchas :-)