I have developed a Suitlet script that, in particular, loads an .xml file for further processing using the file.load
method with an absolute path. I want to use a relative path, but when I do so, it won't work.
Basically, I'm providing the file.load
method with the absolute path of an .xml file.
I expect the same behavior with a relative path provided instead, but it throws an error.
Both my Suitlet and .xml are in the same folder next to each other.
Forks fine:
var xmlTemplateFile = file.load({ id: 'SuiteScripts/printXml/template.xml' });
Doesn't work:
var xmlTemplateFile = file.load({ id: 'template.xml' });
Error message:
{"type":"error.SuiteScriptError","name":"RCRD_DSNT_EXIST","message":"That record does not exist. path: template.xml
I expect file.load
, provided with a relative path, to load my .xml file seamlessly.