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)
... found Interwoven WorkSite applications in both online and offline modes
sleclerc
I am using a 8.2 ImportCMD in VS.NET 2003 to import a document. After I execute the "Execute()" statement I am trying to cast the 'ContextItems.Item("ImportedDocument")' to an iMANDocument Object and I receive the following error:
Application mode command found Interwoven WorkSite applications in both online and offline modes.
Does anyone know how to resolve this error?
A code fragment is listed below.
------------------------------------------------
oContextItems = New ContextItems
' Define the required values for the open command
oContextItems.Add("ParentWindow", System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle().ToInt32)
oContextItems.Add("IManExt.Import.FileName", FileName)
oContextItems.Add("DestinationObject", m_MANSession)
impCmd = New ImportCmd
impCmd.Initialize(oContextItems)
impCmd.Update()
impCmd.Execute()
oDoc = CType(oContextItems.Item("ImportedDocument"), IManDocument)
Find more posts tagged with
Comments
jny
This is currently being addressed via DevSupport.
This was tested to work correctly in-house using this script which is similar to yours except that it has the dms login code in it, and that it's a Windows form base:
==================================
Imports IManage
Imports IMANEXTLib
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dms As ManDMS = New ManDMSClass()
Dim sess As IManSession = dms.Sessions.Add("DSS_WIN2003SERV")
sess.Login("GUEST", "MHDOCS")
Dim cmd As IMANEXTLib.ImportCmd = New ImportCmdClass()
Dim context As IMANEXTLib.ContextItems = New ContextItems()
Dim filename As String = "C:\Temp\Throwaway.doc"
' Define the required values for the open command
context.Add("ParentWindow", Me.Handle.ToInt32())
context.Add("IManExt.Import.FileName", filename)
context.Add("DestinationObject", sess)
cmd.Initialize(context)
cmd.Update()
cmd.Execute()
Dim brefresh = context.Item("IManExt.Refresh")
If True = brefresh Then
Dim doc As IManDocument = CType(context.Item("ImportedDocument"), IManDocument)
End If
Me.Close()
End Sub
End Class
==================================