Hello all! I have a project I'm working on and par...
# advancedpdf
j
Hello all! I have a project I'm working on and part of the solution I need to implement is a conditional field to show up on the invoice pdf. the field is the ship to address to the my company's subsidiary. and I need it to show ONLY if their payment method indicates that they are paying by check. and I'm SUPER lost on how to make this happen. Please help.
j
Hi James! Do you already have an advanced PDF set up for the invoice PDF? In general I'd refer you to the below documentation: NetSuite's docs: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_4453550706.html BFO Docs (the 3rd party library NetSuite uses) https://bfo.com/products/report/docs/userguide.pdf FreeMarker syntax (the templating language NetSuite relies on): https://freemarker.apache.org/docs/dgui_template_exp.html
j
I do already have one set up. I just need to add to it
j
I wonder if you'd need to pull the subsidiary address into a custom field on the invoice record from which you can access it in the advanced PDF template.
I don't believe you will be able to access the subsidiary data from within the template.
j
how would i get it to only populate if a customer is paying by check
j
Yeah, that might be tricky also as I'm assuming the payment method would be denoted on the payment record only and not on the invoice. You might have to use a workflow or script to set a custom field on the invoice denoting that it was paid by check.
Once you get an identifier on the invoice that it was paid by check, you'd just have to put the if statement in the template display the address if the condition is met