I created an Inline HTML field on Vendor Bill, Whe...
# suitescript
n
I created an Inline HTML field on Vendor Bill, Whenever I try and set the value through UE I get this error:
b
what does your code look like
n
var table = 'Test Space test' scriptContext.newRecord.setValue({'fieldId':'custbody_kes_approve_history', 'value': table});
It's an afterSubmit @battk
b
you can't submit the scriptContext.newRecord in an afterSubmit
n
Okay, then where would I need to do that code to set the value of the field? Or how would I modify this one?
b
nor can you save a value in an inline html field
usually you set a default value in the custom field page
or if you need more dynamicness, you set its value in beforeLoad
n
Ahh I'm so dumb sometimes. Working now. I just had to move code to beforeLoad and use default value. thansk!
Trying to get that inline html field to print on a email template. Shows up blank. any ideas? @battk
b
not an option
use a regular field that stores its value for your email template
inline html is for use in the ui
n
ah dang. Okay, I was trying to create a table of data to then add to the email template
b
you might be able to get it to work with a default value that is set on the custom field page
n
Well, the table is from a search so I am building the table in the code and was trying to set the field to that value. So, need to do it there.
I can usually get inlineHTML data into a advanced pdf so shouldn't the email template work similar?
b
were you using a beforeLoad for those?
n
I was using a before load to set the default value of the inline html. But that didn't show up on email template.
b
my quesetion more was were you using an inline html field with a value set in the beforeLoad script for your advanced pdf
n
I don't remember honestly, do you think my results would be different if I set default value on beforeSubmit or afterSubmit?
b
no, i dont think you get any user events, which is why i said what you were doing wasn't an option
n
any ideas on a way I could make it work?
b
use a normal field
n
But I can't put a html table in a normal field though right?
b
it won't display in netsuite, but you don't need it to display in NetSuite
n
and when you say normal field, like a free form text?
b
If your table will fit
n
So I tried the table as the value of the free form text and when I print the email it just prints the table html as a string
b
Oh well. You may be doomed then.
n
Is there anyway to parse the string to html in freemarker?
b
Dunno