You are viewing limited content. For full access, please sign in.

Question

Question

Get selected document in Client

asked on March 22, 2017

I need to be able to collect the type of whatever the user has selected in the Client once they have entered a repository.

I don't understand the ImageEnable.GetSelectedItemID method because even if I set the type to 1, meaning only return an ID number for documents, it still returns an ID number when the repository or a folder are selected.

I want to be able to tell whether or not the user has selected an object that is a document.

0 0

Answer

SELECTED ANSWER
replied on March 22, 2017

ImageEnable is depracated, try using Client Automation Tools (aka CAT) instead. For sample code, check out this post. At line 21 you would do this kind of thing:

EntryInfo entryInfo = Entry.GetEntryInfo(entryId, session);
if (entryInfo.EntryType == EntryType.Document)
{
    DocumentInfo docInfo = (DocumentInfo)entryInfo;
    // Do something with the document
}
else if (entryInfo.EntryType == EntryType.Folder)
{
    FolderInfo foldInfo = (FolderInfo)entryInfo;
    // Do something with the folder
}

 

1 0
replied on March 22, 2017

I was using the documentation from the Integrator I CPP, which is out of date. Thank you.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.