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)
Search for a Workspace by its ID (moniker)?
System
Hello,
Was wondering if anyone could lend a hand...
trying to search for a workspace by its id (moniker) and keep getting the error "[NRTSession ][SearchPages ]Invalid parameter for request"
This does work once we are trying to search for a folder by its ID. Here is a code snippet:
***Begin***
[c#]
oWSParm = DMS.CreateWorkspaceSearchParameters();
PSP=DMS.CreateProfileSearchParameters();
oWSParm.Add(imFolderAttributeID.imFolderID,Search);
return Sess.SearchWorkspaces(DBList,PSP,oWSParm); // <- Throws an exception: "[NRTSession ][SearchPages ]Invalid parameter for request "
***End***
Essentially, we are looking to search for workspaces and folders by a unique reference. We can successfully search by the workspaces name and/or owner but that combo is not guaranteed to uniquely identify the selected/desired workspace. If we're going about it wrong or have another way of ensuring we grab the correct the workspace it would be appreciated.
Find more posts tagged with
Comments
jny
Use the GetObjectBySID (IManDMS) Method, which accepts a moniker as its argument, to get a handle to the WorkSite object.
[C#]
// Assuming odms is valid handle to a connected dms object.
string mk = "!nrtdms:0:!session:NTDEVSUPPORT:!database
SS1:!page:355:";
IManWorkspace ws = (IManWorkspace)odms.GetObjectBySID(mk);