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
help with oscript xml import/export
Tom_Baghdassarian_(HPcaUser1_(Delete)_2164649)
ok - what the heck am I doing wrong here:the code is supposed to copy an object by exporting it and then importing it again in a new location. it works - sort of - the object IS exported and properly imported, BUT the ImportUsingParams function always returns false (regardless if it worked or not) AND, I always get the following error: [Login object refcnt mismatch] btw. I've experimented with removing the export.Delete() and db.Delete() functions.//codeInteger targetID = Str.StringToInteger(r.targetid)Integer parentID = Str.StringToInteger(r.parentid) Object export = $LLIApi.XmlExportConfig.New()Boolean success = export.DbCreateUsingContext( .fprgctx)success = export.ExportById( parentID, "c:\llexport.xml")export.Delete() Object db = $LLIApi.GenericDb.New()success = db.DbCreateUsingContext( .fprgctx)success = db.ImportUsingParams("c:\llexport.xml",targetID,true) db.Delete()thanks
Find more posts tagged with
Comments
There are no comments yet