am trying to add functionality to allow a user to delve into the DMS for a specific document or documents and then to display the document / documents.
am using the v8 SDK - Worksite Extension Library
am trying to use the code from there (converted to c#)
first problem is when the search dialog form first comes up, there is a "white area" at the bottom with "i Action canceled" on it. ??
here is the code
IMANEXTLib.SearchCmd pSrchCmd = new IMANEXTLib.SearchCmdClass();
IMANEXTLib.ContextItems pCtxtItems = new IMANEXTLib.ContextItemsClass();
IManage.NRTSearchParameters pSrchParams;
IManage.NRTDocuments pNRTDocs;
IManage.NRTSession[] sessions = new IManage.NRTSession[1];
sessions[0] = (IManage.NRTSession)Login.DMS.Sessions.ItemByIndex(1);
pCtxtItems.Add ("ParentWindow", this.ParentForm.Handle);
pCtxtItems.Add ("NRTDMS", (IManage.NRTDMS) Login.DMS);
pCtxtItems.Add ("SelectedNRTSessions", sessions);
pSrchCmd.Initialize(pCtxtItems);
pSrchCmd.Update();
if (pSrchCmd.Status == (int) IMANEXTLib.CommandStatus.nrActiveCommand)
{
pSrchCmd.Execute();
pNRTDocs = (IManage.NRTDocuments) pCtxtItems.Item("SearchedNRTDocuments");
// following line removed or fails during run-time with ArgumentException - the parameter is incorrect
//pSrchParams = (IManage.NRTSearchParameters) pCtxtItems.Item("SearchParameters");
IMANEXTLib.ViewCmd pViewCmd = new IMANEXTLib.ViewCmdClass();
IMANEXTLib.ContextItems pCtxt2Items = new IMANEXTLib.ContextItemsClass();
pCtxt2Items.Add ("ParentWindow", this.ParentForm.Handle);
pCtxt2Items.Add ("SelectedNRTDocuments", pNRTDocs);
pCtxt2Items.Add ("TemporaryDirectory",
@C:\InterwovenWork);
pViewCmd.Initialize(pCtxt2Items);
pViewCmd.Update();
if (pViewCmd.Status == (pViewCmd.Status & (int) IMANEXTLib.CommandStatus.nrActiveCommand))
{
pViewCmd.Execute();
if (Convert.ToBoolean(pCtxtItems.Item("IManExt.Refresh")))
{
MessageBox.Show("its ready");
}
pCtxtItems.Remove("IManExt.Refresh");
}
pCtxtItems.Remove("SearchedNRTDocuments");
// following line removed or fails during run-time with ArgumentException - the parameter is incorrect
//pCtxtItems.Remove("SearchParameters");
// changed it to
pCtxtItems.Remove("SearchedParameters");
pCtxtItems.Remove("SearchedDatabases");
pCtxtItems.Remove("varOverFlow");
}
the view command is never Executed as the pviewCmd.Status = 1 after the Update method is called.
also - is there any way of having a look at the context items that are returned from the Search command - specifically the documents to see what it is bringing back ??
all help gratefully appreciated
tia
m