This topic contains 2 replies, has 0 voices, and was last updated by pcutler 7 years ago.

  • Author
    Posts
  • #17832

    mburstein

    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 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.
    This is a cached copy. Click here to see the original post.

  • #17833

    mwhite@hgyp.com

    I’ve not found a good way to do this yet, but I’m interested in what you find.

    A related problem we’ve experienced to pass along. We have a file we include in our Advanced PDF templates that houses all of our subsidiary specific data. That way I can change it in one place and all of my templates have the new information. BUT, NetSuite regularly has days where the file doesn’t include properly and the Advanced PDF blows up. IT was happening regularly enough with invoices that we had to remove the include and copy the text.

    It will be interesting to see if the cause for this is on the PDF side or the File Cabinet side. If it’s on the File Cabinet side, you’ll see similar issues with what you’re creating.

  • #17834

    pcutler

    I’ve used the document search approach, the web site hosting files approach, and SSPs, but ultimately I found the best solution for static content has been to host the HTML/CSS files outside of NetSuite where I have control over the URLs.

You must be logged in to reply to this topic.