I'm working on an external Suitelet that displays different HTML pages based on specific parameters. In order to load the html I'm using a relative path "SuiteScripts/[pathtofile]/[filename]", which works, but I have two problems:
1. I plan on bundling this to transfer to another account, which will change the potential path.
2. The HTML files use <link> tags to load other files in the cabinet (i.e. js/css) but the relative path doesn't work for these since the suitelet domain is different than the file cabinet domain. I got around this by placing the files in the Web Site Hosting Files directory and using '/c.accountid/' but this also poses a challenge for bundling.
What's the best way to get a dynamic file cabinet path that is subject to change between accounts?
Ideally, I'm looking for an absolute path like h ttps://system.na1.netsuite.com/SuiteScripts/myfolder/myscriptfile.js that works externally.
One potential solution I thought of was to get the path to the suitelet file and then use a Document search to get the external links to the rest of the files but it seems like there should be a better way.