Documents opened with OpenCmd not checking in
Hi, i am using the OpenCmd to open documents and checking them out and it works great with Word and Acrobat documents, but when i use this to open a document where there is no integrated application the document is not checked back in when the application is closed., eg. ANSI file opened in Notepad.
I think that Filesite usually monitors the Notepad process and checks the document back in when the application is closed and the file in portable is no longer locked, but does this happen when you open the document using the OpenCmd api call?
Thanks.
Here is my code:
Dim MyCommand = New IMANEXTLib.OpenCmd
Dim MyContext As IMANEXTLib.ContextItems
MyContext = New IMANEXTLib.ContextItems
Dim pArrDoc(1) As IManage.NRTDocument
pArrDoc(0) = pDoc
'MsgBox(pDoc.CheckedOut)
'Required Fields
MyContext.Add("ParentWindow", GetActiveWindow)
MyContext.Add("SelectedNRTDocuments", pArrDoc)
'Optional Fields
MyContext.Add("IManExt.OpenCmd.NoCmdUI", True)
MyContext.Add("IManExt.OpenCmd.Integration", False)
MyCommand.Initialize(MyContext)
MyCommand.Update()
'if we have an OK status, display the new profile screen
If MyCommand.Status = IMANEXTLib.CommandStatus.nrActiveCommand Then
MyCommand.Execute()
'MsgBox(MyContext("ImanExt.MonitorProcessesHoldingOpenDocs"))
Else
MsgBox("OpenDocIntegrated: could not execute.", vbCritical)
End If
MyCommand = Nothing
MyContext = Nothing
I think that Filesite usually monitors the Notepad process and checks the document back in when the application is closed and the file in portable is no longer locked, but does this happen when you open the document using the OpenCmd api call?
Thanks.
Here is my code:
Dim MyCommand = New IMANEXTLib.OpenCmd
Dim MyContext As IMANEXTLib.ContextItems
MyContext = New IMANEXTLib.ContextItems
Dim pArrDoc(1) As IManage.NRTDocument
pArrDoc(0) = pDoc
'MsgBox(pDoc.CheckedOut)
'Required Fields
MyContext.Add("ParentWindow", GetActiveWindow)
MyContext.Add("SelectedNRTDocuments", pArrDoc)
'Optional Fields
MyContext.Add("IManExt.OpenCmd.NoCmdUI", True)
MyContext.Add("IManExt.OpenCmd.Integration", False)
MyCommand.Initialize(MyContext)
MyCommand.Update()
'if we have an OK status, display the new profile screen
If MyCommand.Status = IMANEXTLib.CommandStatus.nrActiveCommand Then
MyCommand.Execute()
'MsgBox(MyContext("ImanExt.MonitorProcessesHoldingOpenDocs"))
Else
MsgBox("OpenDocIntegrated: could not execute.", vbCritical)
End If
MyCommand = Nothing
MyContext = Nothing
0
Comments
-
I think you can do something like this at the end of your code
//objDoc is IManDocument object
If objDoc.IsAnyVersionCheckedOut Then
objDoc.CheckIn(objDoc.CheckoutPath, CheckinDisposition.nrReplaceOriginal, CheckinOptions.nrDontKeepCheckedOut, Err)
End If
'Populate the ContextItems collection with values
Context.Add("IManExt.Refresh", True)
Context.Add("RefreshFolderContents", True)0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.