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
Cannot copy a node from another user - oScript
Thanh_Ho
Hi,I have oScript codes copying a node (a form) into a new folder. The problem is the codes work very fine with Admin user, whose account I'm developing in. However, when I switch to another user, which also has all the rights, it doesn't work. I tried copying manually and it's still okay. So the problem comes from the codes.I use both two options below and none of them works: //One way is quite long /*DAPINODE newNode = DAPI.AllocNode(dSession) if(IsError(newNode)) return -1 //newNode end newNode.pName = newName Integer ok = DAPI.CopyANode(sourceNode, parentNode, newNode, \ DAPI.COPY_CURRENTV | DAPI.COPY_DST_PERMS | DAPI.COPY_DST_CAT | DAPI.COPY_DST_USERATTS) if(ok != DAPI.OK) return -1; end*/ //The other way is shorter DAPINODE newNode = DAPI.CopyNode(sourceNode, parentNode, 0, newName) if(IsError(newNode)) return -1 end The error value I've got from CopyNode is E662241284Anyone could help?Thanks
Find more posts tagged with
Comments
Appu_Nair
Instead of DAPI try using lliapi and its node implementation.Donna always suggests this method and you will be surprised how many things work more effectively this way.Search for Donna Nalls or llapi in this and you should get a lot of hits
Thanh_Ho
Thanks a lot, Appu.It now works amazingly. So basically I suggest builder documentation would be better rewritten a bit.