Create Copy of DCR With OpenAPI
I want to copy an existing DCR and give it a new DCR name using OpenAPI but not sure how to do this. I was able to make a copy of the DCR with IWFileHandle but then NOT able to edit the data record since its type is a file and not DCR. Can you add a DCR with OpenAPI?
Thx
Briscoe
Thx
Briscoe
0
Comments
Hope this helps.
-- James
--
James H Koh
Interwoven Engineering
This does help. I assume that OpenAPI supports adding the Extended Attributes after I create the DCR copy.
Thanks again
Briscoe
Thanks,
Briscoe
IWSimpleFile sf = (IWSimpleFile) IWPathNamedObject.lookupByPath(fileSysService, tmpPath + "/" + fileName);
if( sf == null )
{
sf = dir.createChildSimpleFile(fileSysService, fileName, null, null, "LiveWoven Export");
}
if( sf == null )
{
logFile.Print("IWOpenAPI:ExportFileExAttr", "Could Not Create File - " + fileName + " In Export Path - " + tmpPath, "ERROR");
return false;
}
// Set Extended Attribute
sf.setVarValue fileSysService, "TeamSite/Templating/DCR/Type", "Category/Content Type");