Hello NetSuite Community,
We are working on a Customer Statement Advanced PDF template and need to filter out specific journal lines based on their account number before printing. Specifically, we want to suppress journal lines that are posted to the following accounts:
• 22020
• 22010
These are internal provision entries that should not be visible to customers on their printed statements.
What We Have Tried
We attempted to access the account number on the statement line object using every field name variation we could find within the FreeMarker template:
${line.account!"x"}
${line.accountid!"x"}
${line.accountnumber!"x"}
${line.accountno!"x"}
${line.acctnum!"x"}
${line.custcol_account!"x"}
All of the above returned empty values for journal lines.
We also used line?keys to inspect all available fields on the line object, but this threw the following error:
"For ?keys left-hand operand: Expected an extended hash, but this has evaluated to a hash+string (wrapper: com.netledger.templates.model.StringModel)"
The fields that do return values on a journal statement line are:
• line.description → e.g. "Journal #BB25000054JE"
• line.memo → e.g. "JV24/12/35_BEING ADJUSTMENT FOR BANK CHARGES"
• line.datecol → e.g. "31/12/2024"
• line.charge → e.g. "$14.82"
• line.balance → e.g. "$415,427.86"
Notably, line.account, line.accountnumber, and all account-related fields return empty strings for journal lines, even though the underlying journal entry is clearly posted to a specific GL account.
Our Question
- Is the GL account number intentionally not exposed on statement line objects in Advanced PDF templates?
- If not, is there a supported field name or method to access the account number (or account internal ID) on a statement line in FreeMarker?
- If the account field is truly not available, is there a recommended workaround
Expected Behavior
We would expect line.account or line.accountnumber to return the GL account number (e.g. "22020") for journal lines on the customer statement, in the same way that account fields are accessible on invoice line items in other Advanced PDF templates.
Any guidance from the community or NetSuite support would be greatly appreciated. Thank you.