Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Having Problems with GetDocument() method
System
Hi all,
I'm currently trying to integrate our document automation program into Interwoven using the Interwoven SDK. So far, I've been able to use the SDK to atuomatically profile a document that we create through HotDocs into Interwoven. The next problem is that once the document has been stored in Interwoven, we want to be able to then display that document back to the end user - so we either need to use the CheckOut or getCopy methods to get a copy of the profiled document so that we can display it.
Here is the code I'm trying to use:
try
{
IManDMS odms = new ManDMSClass();
IManSession isession = odms.Sessions.Add("capform");
isession.Login("nigel123", "nigel123");
// Get target database
IManDatabase odb = isession.PreferredDatabase;
// Execute search
IManUsers oUsers = odb.SearchUsers("GUEST", imSearchAttributeType.imSearchBoth, true);
string objID = isession.ObjectID;
***IManDocument iDoc = odb.GetDocument(docNum, docVers);***
string copyFilename = "C:\\stress test\\filename.doc";
if(iDoc.IsOperationAllowed(imDocumentOperation.imCheckOutDocumentOp))
{
iDoc.CheckOutEx(copyFilename,imCheckOutOptions.imDontReplaceExistingFile, DateTime.Today, "Test CheckOut", imHistEvent.imHistoryCheckout,"generatingApplication","location");
}
//Get Location (Machine Name) where document is checked out
string machineName = iDoc.CheckoutLocation;
//Set comment for checked-out document
//iDoc.CheckoutComment = "Checkout Testing";
//theDocument.GetCopy(copyFilename, imGetCopyOptions.imNativeFormat);
Response.ContentType = "application/msword";
Response.Write("The document has been saved to: "+copyFilename);
}
catch (Exception ex)
{
LexisNexis.HotDocs.Server.UtilityTools.AddLogEntry(1, "The message was: " + ex.Message);
}
The error I get (I've marked in asterisks the line it craps out on) is:
[NRTDatabase ][GetDocumentArtifactInfo ]GetDocumentArtifactInfo : This operation is currently not available "
So basically, I try to get the IManDocument object which has document number docNum (taken from the checkIn method) and version number docVers (again taken from the checkIn method and passed through) However when I try to do this it gives me that error above.
Does anyone have any insight onto why this happens and how to fix it? I would be very grateful of any help received.
Cheers
Andy
Find more posts tagged with
Comments
Migrateduser
hi
I am not much knowledgeable in this case,but i will suggest you that just confirm the support availability of this method "GetDocument()" with the TS Version you are using.
Beacuse their are many methods that are provided but dont't have support to all version.
I may be possible that your TS version does not support this method.
Thanks