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 version across subtypes with oScript
Thanh_Ho
Hi everyone,I have to write an oScript module in which some nodes should be copied and changed subtypes. Original nodes are in any subtypes such as emails, media contents (in media folders) etc. Destination nodes should be in document (144) subtype. For each node, only a specified version is needed.Can anyone help?Thank you very much.
Find more posts tagged with
Comments
sıɹɥɔ
Message from Chris Webster <
cwebster@opentext.com
> via eLink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">eLink
Hi Thanh,
You can't copy a node and change its subtype. It sounds as though what you're really trying to do is create new Document nodes and set their contents to those of nodes of another type.
To create and manage a Document node you'll want to use the scripts in:
$LLIAPI.LLNodeSubsystem.GetItem ($TypeDocument)
These scripts would include
NodeCreate()
and
NodeAddVersion()
.
The parameters to NodeAddVersion include an Assoc; you can set the
SrcVersion
keyed value to the appropriate version from a source node, and the version from the source will be added as a new version to your node.
The documentation for thse routines can probably be found in .../
builder/documentation/moduleindex/kernel/index-lliapi.html
or you can browse the source code itself and make reasonable assumptions about what the api is.
Hope this helps,
-chris
From:
eLink Discussion: Development Discussion [mailto:development@elinkkc.opentext.com]
Sent:
Tuesday, March 10, 2009 7:44 AM
To:
eLink Recipient
Subject:
copy version across subtypes with oScript
copy version across subtypes with oScript
Posted by
thanh.ho@mottmac.com
(Ho, Thanh) on 2009/03/10 08:40
Hi everyone,
I have to write an oScript module in which some nodes should be copied and changed subtypes. Original nodes are in any subtypes such as emails, media contents (in media folders) etc. Destination nodes should be in document (144) subtype. For each node, only a specified version is needed.
Can anyone help?
Thank you very much.
Thanh_Ho
Thanks a lot, Chris. I will try.
Thanh_Ho
It's pretty simple. Thanks a lot Chris.