Hi Everyone! Hope you all are staying safe and hea...
# suitescript
c
Hi Everyone! Hope you all are staying safe and healthy in these wild times! Quick question that I cannot seem to find an answer to elsewhere: Is it possible to generate a customer's statement in SuiteScript? I was hoping that render.statement()'s entityId would be the customer, but that does not appear to be the case. Thanks!
d
Hi Chris. I'm currently strugging with the same problem. For single statement, I think I have solved it:
Copy code
let html_statement_string = render.statement({
    entityId: parseInt(customerId),
    printMode: render.PrintMode.HTML,
    //@ts-ignore (looks like there is an error in documentation)
    startDate: '2020-01-30',
    statementDate: '2020-02-28').getContents();
But in my case I have to consolidate statements for many customers and that's the issue 😞
n
I think entityid is, counter intuitively, the transaction id. NOT the customer @Dmitry Masanov
d
Let me double check
I did a quick test and it looks like this is customer id. I generated a statement in script and manually and they look the same. Anyway, what is the transaction id for the statement?