Create ConnectedWorkspace using OScript
Hi,
I am trying to create workspace using OScript, but getting error "select a valid template to create a business workspace". Below is my code snippet can any one please help me in solving this.
Dynamic NewFolderName, LLNode, parentFolder, storingFolder, nodeStatus
Assoc fileData
wSession = prgCtx.Dsession().fSession Dynamic rootNode = DAPI.GetNodeByID( wSession, 2000 ) parentFolder = DAPI.GetNode( "EHS:Demo Incidents", rootNode ) LLNode = $LLIAPI.LLNodeSubsystem.GetItem ( $TypeEcmWorkspace ) NewFolderName = "TestFolderCreation" retVal = $LLIAPI.NodeUtil.IsNameUnique( NewFolderName, parentFolder ) if ( retVal.OK ) StoringFolder = LLNode.NodeAlloc( parentFolder, NewFolderName ) if ( StoringFolder.OK ) StoringFolder = StoringFolder.node fileData.comment = "Folder created via Script." fileData.provider = "EXTSHARED" else retVal.OK = FALSE echo( retval.errmsg ) end else echo( retval.errmsg + " Trapping error on Node Uniqueness" ) end if ( retVal.OK ) nodeStatus = LLnode.NodeCreate( StoringFolder,parentFolder, fileData ) if ( !nodeStatus.OK ) retVal.OK = FALSE echo( retval.errMsg ) else echo( "folder created" ) end end
Thanks,
Sagar
0
Comments
-
What I would do is to trace the code when it hits the REST API or if you have a successful GUI way of adding the workspace use that . If you know adding a business workspace through GUI there are 3 screens so in all possibility you are missing parameters you can also cheat and call probably the rest api call as sometimes I have called soap code from Oscript. Dispatch object is where the call gets for debugging.0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 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