Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Add Node Version
Finney_Bryan_(x-giantuser2_-_(deleted))
Does any know how to add a version to a node from another node within the system?Thanks,Bryan FinneyGiant Eagle Inc.
Find more posts tagged with
Comments
eLink User
Message from Daniel Couto via eLinkHi Bryan,Use this DAPI function:Integer CopyVersion( DAPIVERSION originalVersion, DAPINODE node, DAPIVERSION newVersion, [Integer options], [String provider] )Check the Builder Help for more details on it.Cheers,Daniel-----Original Message-----From: eLink Discussion: Development Discussion[mailto:development@elinkkc.opentext.com]Sent: Friday, September 20, 2002 5:29 PMTo: eLink RecipientSubject: Add Node VersionAdd Node VersionPosted by GiantUser2 on 09/20/2002 11:25 AMDoes any know how to add a version to a node from another node within thesystem?Thanks,Bryan FinneyGiant Eagle Inc.[To reply to this thread, use your normal e-mail reply function.]============================================================Discussion: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Finney_Bryan_(x-giantuser2_-_(deleted))
Does anyone know how to copy attributes from one node to another?How about if I try to copy the attributes from from doc A to doc B and then add doc B as a new version to doc A how would I copy the attributes? I tried the following but it does not seem to do anythingretAssoc = $LLIAPI.NodeUtil.CopyAttributes( srcNode,dstNode ) retVal = DAPI.UpdateNode( srcNode )
Finney_Bryan_(x-giantuser2_-_(deleted))
Here is the solution from Opentext SDK Support (kward):When copying a version, the categories of the srcVersion are actually copied along with it. So your new version will have the categories from the srcVersion and not the dstNode. To get around this, you can set the versions categories to whatever you want including that of the parent after copying it. The following code shows one way of doing this.Dynamic statusDAPINODE dstNode = DAPI.GetNodeByID(prgCtx.DSession().fSession, -2000, 124600)DAPIVERSION dstVersion = DAPI.AllocVersion(prgCtx.DSession().fSession)DAPINODE srcNode = DAPI.GetNodeByID(prgCtx.DSession().fSession, -2000, 124603)DAPIVERSION srcVersion = DAPI.GetVersion(srcNode, 0) status = DAPI.CopyVersion( srcVersion, dstNode, dstVersion,DAPI.VCOPY_ADDVER ) echo(dstNode.pVersionNum)Dynamic parentAttr = $LLIAPI.AttrData.New( prgCtx, dstNode.pID, dstNode.pVersionNum - 1)parentAttr.DBGet() Dynamic newAttr = $LLIAPI.AttrData.New( prgCtx, dstNode.pID, dstNode.pVersionNum )newAttr.DBGet() newAttr.fData = parentAttr.fDatanewAttr.fDefinitions = parentAttr.fDefinitions Dynamic llnode = $LLIAPI.LLNodeSubsystem.GetItem( dstNode.pSubtype )status = llnode.NodeCategoriesUpdate( dstNode, newAttr )