Hello - Does anyone have a guide or guide to displ...
# general
j
Hello - Does anyone have a guide or guide to display a message on Invoices PDF/HTML only if a specific item is on the list? Thanks
m
Do you want to display this message when someone loads the Invoice in the UI in NetSuite?
Or do you want it to print out on the printed/emailed invoice?
j
I meant printed - sorry for lack of context.
m
Yes you can do this via a workflow. Add a custom field to your invoice form. Then in a workflow add a Set Field value action
The condition of the Set Field Value Action could be a saved search
j
Wow! I've never used a workflow for PDF/HTML forms
very interesting
m
the saved search would have the criteria that you want (like item = specific item)
then set your custom field to be "Your custom message".....then update your PDF template to include your new custom field
In some cases it will be blank, and some cases it will have your custom message depending on the criteria of your saved search
j
so it would be scheduled?
m
No you could do it on create
j
We kind of need it when the document is created since it is emailed to the customer
m
After Record submit
j
I see
m
you can add a saved search condition to any action within a workflow
message has been deleted
Here is your Set Field value action
The field should be your new custom field you made
message has been deleted
And the static value should be your custom message
j
ok thanks. Giving this a try
a
you could also just loop through your items list to identify whether the condition is met first, then use that to display your message or whatever, if you only need it within the pdf template
you can use the
<#assign var = value />
directive to set variables that you refer to later on in the template