How do you reference images that are stored in your Filing Cabinet when trying to embed them into HTML.
For example, when using logos in your emails how do you reference them?
When constructing emails that are used within SuiteScript you would think you’d need to construct the emails with both the url
of the file AND the domain
of your Netsuite instance, perhaps coded like this:
|
|
However, the result from this function is https://0000.app.netsuite.comhttps://0000.app.netsuite.com/yourFileLocation
As you can see it prepends the domain twice to your URL construction!
Upon uploading the file to the Document storage in Netsuite, if you have the checkbox Available Without Login this will provide the full url when using the url
property.
Therefore, you don’t need to obtain the domain
value using the url
module.
Simply fetch the url
property from the file upon loading it.