Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Issues with Refiling....
Viswa
Hi,
I am trying to use the IMANRefileCMD of the iMANExt2 library with a 8.2 DMS to refile the properties of the updated workspaces to the folders and documents in the workspace. I need to do this in my Web Application. Please find attached a sample web application that I use and it fails when the cmd.Execute method is running. Please find also the code snippet below.
This works as a windows application though where as I would like to implement the same in a web application. I have the following code on a button click event. It gets hungup when the oCmd.Execute() is executed.
Please get back to me as this one of the main reason that we upgraded to worksite web 8.1 and DMS 8.2
Thanks
Viswa
240-386-5754
Imports IManage
Imports IMANEXTLib
Imports IMANEXT2Lib
Imports IMANEXTLib.CommandStatus
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oDMS As New ManDMS
Dim oSess As IManSession
Dim oWS As IManWorkspace
Dim wp As IManWorkspaceSearchParameters
Dim oFldr As IManDocumentFolder
Dim fs As IManFolderSearchParameters
Dim oManStrings As New ManStrings
Dim oCmd As IManRefileCmd
Dim oContext As ContextItems
Dim bRefresh
oSess = oDMS.Sessions.Add("*******")
oSess.Login("*******", "*******")
oManStrings.Add(oSess.Databases.ItemByName("iOTS").Name)
wp = oDMS.CreateWorkspaceSearchParameters
wp.Add(imFolderAttributeID.imFolderName, "2006-0001") ' name of the test workspace
oWS = oSess.SearchWorkspaces(oManStrings, oDMS.CreateProfileSearchParameters, wp).ItemByIndex(1)
oWS.SetAttributeByID(imProfileAttributeID.imProfileDescription, "Testing Refile Command")
oWS.SetAttributeByID(imProfileAttributeID.imProfileCustom14, "Testing Refile")
oWS.Update()
oCmd = New IManRefileCmd
oContext = New ContextItems
' Required
'oContext.Add("ParentWindow", Me.web)
oContext.Add("SelectedIManObject", oWS)
oContext.Add("IManExt.ConfirmIndividuals", False)
' Optional
oContext.Add("ConfirmMessages", False)
oContext.Add("IManExt2.RefileNoUI", True)
oCmd.Initialize(oContext)
oCmd.Update()
If oCmd.Status = (oCmd.Status And nrActiveCommand) Then
oCmd.Execute()
bRefresh = oContext.Item("IManExt.Refresh")
If bRefresh Then Response.Write("Workspace is refiled.")
End If
End Sub
Find more posts tagged with
Comments
jny
You can't use the RefileCmd Object in a Browser environment. This command object is implemented to make use of Windows controls thus it's Desktop Client specific.
You would need to do your refiling using the low-level API's (from the imanage.dll) specifially via the AdditionalProperties to push profile from WorkSpace to folder. Then, you can use the IManDocument.Refile Method to get the folder profile pushed to the document. You may also use the .Refile Method to directly duplicate the workspace profile to the document.
If you own the SDK, check with DevSupport for further assistance on how to make use of the imanage.dll API's.