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)
Session.SearchWorkSpaces
bfelknor
I am working in VB 6 and the version 8 SDK, and am attempting to execute the iManSession.SearchWorkSpaces function.
The application is COM integration, and uses ContextItems to return the current DMS, in this case from DeskSite 8.
There is only one database in the DMS being returned.
The call to SearchWorkSpaces fails with:
-2147418113 - [NRTSession ][SearchPages ]An unrecognized exception has occurred
Error Source = iManage.NRTDMS.2
LastDLLError = 0
The same attempt, but this time on a database object, succeeds.
The code works perfectly if I do this klugey work-around:
Create and connect a new DMS & Session and execute the function from the new session. (In the database instance, the database object is instantiated in the same function as the SearchWorkSpaces call.)
Some code snippets follow. Thanks so much.
Bruce
Relevant Code Snippets:
'In Declarations section of a Public Module
Global wsDMS as iManDMS
Global wsSession as iManSession
'In ICommand_Update of the Class Module
'These objects are successfully used for all other calls.
Set wsDMS = mContext("NRTDMS") 'Have tried with mContent("iManDMS") same results;
Set wsSession = wsDMS.Sessions.ItemByIndex(1) 'Just for testing; In this case there is only one.
'From form module
'call Public Function GetWorkSpaces which returns an Array of iManFolder
'GetWorkSpaces Function
Dim wsFolders As IManFolders
Dim wsFolder As iManFolder
Dim db As IManDatabase
Dim wssps As IManWorkspaceSearchParameters
Dim psp As IManProfileSearchParameters
Dim wsDateRange As IManDateRange
Dim strDBs As ManStrings
Set wsDateRange = wsDMS.CreateDateRange
wsDateRange.AbsoluteStartDate.Value = StartDate 'Passed-in as Date
wsDateRange.AbsoluteEndDate.Value = EndDate 'Passed-in as Date
Set wssps = wsDMS.CreateWorkspaceSearchParameters
wssps.Add imFolderOwner, wsSession.UserId
Set psp = wsDMS.CreateProfileSearchParameters
psp.Add imProfileCreateDate, wsDateRange.Value
Set wsFolders = wsSession.SearchWorkspaces(strDBs, psp, wssps)
'Error Here
Find more posts tagged with
Comments
There are no comments yet