How to reference css from file cabinet

I am trying to apply a CSS style to my advanced print form template.

The CSS is in a file inside the file cabinet.  The link to that file has been added in my “Advanced Print Form Template”.

My style.css file looks like this:

<style type="text/css">
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #FFFFFF;
}
table {
    font-size: 9pt;
    table-layout: fixed;
    border-color: #C0CCDC;
    border: 3px;
}
th {
    font-weight: bold;
    font-size: 8pt;
    vertical-align: middle;
    padding: 5px 6px 3px;
    color: #FFFFFF;
    background-color: #C0CCDC
        /*#44546A;*/
}
td {
    padding: 4px 6px;
}
td p {
    align: left
}
b {
    font-weight: bold;
}
table.header td {
    padding: 0px;
    font-size: 10pt;
}
table.footer td {
    padding: 0px;
    font-size: 8pt;
}
table.itemtable th {
    padding-bottom: 10px;
    padding-top: 10px;
}
table.body td {
    padding-top: 2px;
}
table.total {
    page-break-inside: avoid;
}
tr.totalrow {
    line-height: 200%;
}
td.totalboxtop {
    font-size: 12pt;
}
td.addressheader {
    font-size: 8pt;
    padding-top: 6px;
    padding-bottom: 2px;
}
td.address {
    padding-top: 0px;
}
td.totalboxmid {
    font-size: 28pt;
    padding-top: 20px;
}
td.totalboxbot {
    font-weight: bold;
}
span.title {
    font-size: 28pt;
}
span.number {
    font-size: 16pt;
}
span.itemname {
    font-weight: bold;
    line-height: 150%;
}
hr {
    width: 100%;
    height: 1px;
}
#logo {
    width: 200px;
    height: 100px;
}
</style>

I have tried the following ways to link to the CSS file with NO success:

        <link href="https://ACCOUNTID.app.netsuite.com/core/media/media.nl?id=FILEID&c=COMPANYID&h=HASHID&_xt=.css" type="stylesheet" />

We tried changing the & separator two different ways:

        <link href="https://ACCOUNTID.app.netsuite.com/core/media/media.nl?id=FILEID&c=COMPANYID&h=HASHID&_xt=.css" type="stylesheet" />
        <link href="https://ACCOUNTID.app.netsuite.com/core/media/media.nl?id=FILEID&amp;c=COMPANYID&amp;h=HASHID&amp;_xt=.css" type="stylesheet" />

We tried using the <#include> tag after changing our .css file into a .txt OR a .ftl

<#include "https://ACCOUNTID.app.netsuite.com/core/media/media.nl?id=FILEID&c=COMPANYID&h=HASHID&_xt=.txt">

OR

<#include "https://ACCOUNTID.app.netsuite.com/core/media/media.nl?id=FILEID&c=COMPANYID&h=HASHID&_xt=.ftl">
We tried doing the same thing but with the "internal id", as mentioned on stack overflow:

https://stackoverflow.com/questions/55816560/how-do-i-include-one-freemarker-template-into-another-in-netsuite
<#include "FILEID">
We have it working for images, so we tried doing something similar:
<@filecabinet nstype="stylesheet" src="URL" />
It would be nice to not have to hard code the CSS.
Please help!

Thank you so much!
Rookie Asked on April 4, 2022 in How To's.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor