Hi all,
I would like to export a resource element (xml/text) out from vCO to a shared folder on the LAN.
I know I could manually do that like: (I just want to automate this button in the scripts)
But can I do it in a WF/scripts?
So far, I've tried to use the following two methods in the API, but they both failed: (InResource is the resource element I created in the resources on vCO)
Approach 1,:
var mime = InResource.getContentAsMimeAttachment(); mime.write("C:\Users\Ryan Wade\Desktop\XML","play.xml");
Approach 2:
var xmlString = InResource.getContentAsMimeAttachment().content; var text = XMLManager.newDocument(); text = XMLManager.fromString(xmlString); XMLManager.saveDocument(text,"./opt");
Did I miss-use these two methods? Or are there other ways around to do so?
Thanks