Home
Extended ECM
API, SDK, REST and Web Services
Getting a node ID from the name
Anquoc_Tran
I have a folder called "Special Documents" at the top of my Enterprise workspace, and this name is fixed.I want to add a new option to the Navigation Menu (i.e. where the options Personal/Enterprise/Tools/Help are found), that links to "Special Documents" (i.e. ...livelink.exe.?func=ll&objId=xxxx), but the node ID xxxx might change between installations.The link on the toolbar is generated in the Execute method of an orphan of WEBLL : WebLLRoot : NaviagtionCallback : LivelinkNavigationCallbaack (as described in the documentation on plugging in to the Livelink interface).How can I pick up the Node ID xxxx when the Livelink server is started and the menu is first created?The default Execute method starts with the lines:// Returns an Assoc of item Assocs (items).function Assoc Execute( \ Object prgCtx, \ Record request ) Dynamic apiError String errMsg Assoc items Assoc retVal Boolean ok = TRUE String scriptName = request.SCRIPT_NAMEHowever, when this is run, I notice that prgCtx is always undefined/empty (even though the default OpenText-written code allows it to be passed into the method).How can I get prgCtx so that I can call something like "DAPI.GetNode()" to find the ID of my folder, or is there some other way?In summary, what I am trying to do is find out "What is the ID of the folder node called "Special Documents" in the top of my Enterprise Workspace?", so that I can then use this ID.Thanks in advance for any help.
Find more posts tagged with
Comments
eLink User
Message from Magnus Salgo <<A HREF="mailto:magnus@ids.se">magnus@ids.se> via eLink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">eLink
ObjID is the unique value of the Dtree table. Why should it change....
Suggestion is: Use the ?func=admin.enterprisemenucfg
to create a menu item ....
Jeff_Lang_(lang_(Delete)_2245920)
Call prgCtx.DSession().GetNodeLibrarythis returns the library node which is the enterprise. Now call DAPI.ListContents( prgCtx.DapiSess(), libraryNode.pVolumeID, libraryNode.pID, 'WebNodes', "Name='Special Documents'" )this will return a recArray with only 1 row if it succeeds. Now you have the nodeID.
Anquoc_Tran
Dear Jeff,Thanks for the reply, that's very helpful indeed.But...The problem still remains that prgCtx is NOT set when the execute method is run (even though somebody must be logged in to cause the navigation menu to be generated and displayed for the first time).The Execute method expects to receive an argument containing prgCtx (not my code, Livelink's default code), but nothing is passed into the method, hence I have no prgCtx to work with and then to use in the code that you kindly supplied.How do I get prgCtx if it is not passed into the method?Thanks for your help,Andy.(Posting under a different user name)PS Using Livelink version 9.1-----------------------------------------------Call prgCtx.DSession().GetNodeLibrarythis returns the library node which is the enterprise. Now call DAPI.ListContents( prgCtx.DapiSess(), libraryNode.pVolumeID, libraryNode.pID, 'WebNodes', "Name='Special Documents'" )this will return a recArray with only 1 row if it succeeds. Now you have the nodeID.
eLink User
Message from chris meyer via eLinkSometimes a function receives a prgCtx directly, sometimes it's already setin the .fPrgCtx feature, or sometimes it's an element of another objectpassed to the method. For example, the CBMove callback gets passed dapiCtx,but it contains dapiCtx.prgCtx as an element.You /could/ grab one from the $PrgSessions global variable, but I don'trecommend it. It's not even guaranteed that this variable will be populatedwhen you need it.Good luck, chris----- Original Message -----From: "eLink Discussion: Development Discussion"To: "eLink Recipient" Sent: Friday, June 28, 2002 10:43 AMSubject: What is the value of PrgCtx?> What is the value of PrgCtx?> Posted by LogicaUKAdmin on 06/28/2002 04:41 AM>> Dear Jeff,>> Thanks for the reply, that's very helpful indeed.>> But...>> The problem still remains that prgCtx is NOT set when the execute methodis run (even though somebody must be logged in to cause the navigation menuto be generated and displayed for the first time).>> The Execute method expects to receive an argument containing prgCtx (notmy code, Livelink's default code), but nothing is passed into the method,hence I have no prgCtx to work with and then to use in the code that youkindly supplied.>> How do I get prgCtx if it is not passed into the method?>> Thanks for your help,>> Andy.> (Posting under a different user name)>> PS Using Livelink version 9.1>>>> -----------------------------------------------> Call prgCtx.DSession().GetNodeLibrary>> this returns the library node which is the enterprise.>> Now call DAPI.ListContents( prgCtx.DapiSess(), libraryNode.pVolumeID,libraryNode.pID, 'WebNodes', "Name='Special Documents'" )>> this will return a recArray with only 1 row if it succeeds. Now you havethe nodeID.>>> [To reply to this thread, use your normal e-mail reply function.]>> ============================================================>> Topic: Getting a node ID from the name>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2771201&objAction=view>>
; Discussion: Development Discussion>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=view>>
; Livelink Server:>
https://knowledge.opentext.com/knowledge/livelink.exe>>>
;