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
Copy node doesn't clone categories
Thanh_Ho
Hi everyone,I have problem with oScript. When I use llnode object to copy a node (a form) to a new destination. I suppose that categories of the destination folder would be cloned into the new form. However, it doesn't happen that way. Categories of the new node are blank.Both lines below don't work. //Assoc copyReturn = llnode.NodeCopy(sourceNode, parentNode, DAPI.COPY_UNRESERVE | DAPI.COPY_UNLOCKV, newName) Assoc copyReturn = llnode.NodeCopy( sourceNode, parentNode, \ DAPI.COPY_UNRESERVE | DAPI.COPY_UNLOCKV | DAPI.COPY_CURRENTV | DAPI.COPY_DST_PERMS | DAPI.COPY_DST_CAT | DAPI.COPY_DST_USERATTS, \ newName )Could anyone help?Thanks,Thanh
Find more posts tagged with
Comments
John W. Simon, Jr.
In the copy code:// Instruct the node copy callback not to perform attribute// handling for the node to be copied since we want to do it// ourselves.copyInfo.AttrHandling = !copyInfo.AddVersion && ( ( copyInfo.AttrCacheID != 0 ) || ( copyInfo.AttrSourceType != lliApi.AttrSourceOriginal ) ) if copyInfo.AttrHandling dapiCtx.fStatus.CopyNodeAttr = FALSEendcopyInfo is an Assoc that is passed in after newNodeName (defaults to undefined). I would try looking at the code that does the GUI copy to see 1) if it sets this variable, 2) what it sets it to, and mimic that with my code.