markW - Tuesday, January 30, 2007 5:09 PM:
I need to prompt the user to select a file from the client using the standard file browser, and after they select a file, open it, and read the contents (which will be XML).RobMcAveney - Tuesday, January 30, 2007 6:15 PM:
Here is some sample method code (client-side, Javascript) to open a file browser and read the selected file. This code then attempts to apply the contents of the file (assuming it is AML) and returns either an error or record count.
var inn = this.newInnovator();
var fileName = top.aras.vault.SelectFile();
var aml = top.aras.vault.ReadText(fileName);
var resultItem = inn.applyAML(aml);
if (resultItem.isError()) {
return "Error: " + resultItem.getErrorDetail();
} else {
return "Success: " + resultItem.getItemCount() + " Items created";
}