I'm updating an old application that works with version 6.5, getting and setting profile information for specific documents. I'm running into problems on a machine with version 8.2. The code uses GetAttributeByID to get and set these values; it works fine with the old version of Desksite, but with 8.2 GetAttributeByID returns a System.__ComObject for some attribute ids (for example, nrCustom1 or nrCustom2, which do have values). On the other hand, when I use nrCustom1Description or nrCustom2Description, I do get values. Can anyone explain what's going on?Thanks.
Thanks, I found that that's true for some attributes, but not all. Some still return a simple value, but some return objects. By trial and error, I changed:txtClient.Text = getDocument.GetAttributeByID(iManage.AttributeID.nrCustom1).ToStringtxtMatter.Text = getDocument.GetAttributeByID(iManage.AttributeID.nrCustom2)toIf Not getDocument.GetAttributeByID(iManage.AttributeID.nrCustom1) Is Nothing Then txtClient.Text = getDocument.GetAttributeByID(iManage.AttributeID.nrCustom1).nameEnd IfIf Not getDocument.GetAttributeByID(iManage.AttributeID.nrCustom2) Is Nothing Then txtMatter.Text = getDocument.GetAttributeByID(iManage.AttributeID.nrCustom2).nameEnd IfThis seems to work. Is this the correct way to do it, or am I still missing something?
I'm strictly a vb guy, but I think I see what you're saying. I'm trying to get a copy of the sdk (only have the documentation for 6.5), which might help.Thanks.