Message Boards
How can I send invoices to specific customer email addresses using QRF?
Joseph Betts, modified 3 Years ago.
How can I send invoices to specific customer email addresses using QRF?
Post Date: 10/9/18 (Bronze, 20 Posts) Recent PostsHi All,
I am wanting to set up the QRF Dynamic Report Burst Settings so that I can send invoices to customer emails and am referring to the Reporting Framework Guide (v2017ee).
I understand that the ReportParameterRepository.p sets the routing rules and the parameter &SYS_EMAIL_TEMPLATE specifies the email templates that are sent to the customer, but where are the email addresses of the customers specified? For example: A report burst has been run and amongst the burst is a report for customer bob who is set-up in customer create menu 27.20.1.1 with his email address. How does the report burst know bob's email address? Where in the ReportParameterRepository.p is the logic for it to understand that bobs email address is in menu 27.20.1.1 and it needs to sent to him?
Kindest Regards,
Joseph Betts
Mark vanHornsveld, modified 7 Years ago.
Re: How can I send invoices to specific customer email addresses using QRF?
Post Date: 10/9/18 (Gold, 216 Posts) Recent PostsHi Joseph,
inside ReportParameterRepository.p you have a temp-table ttDataRowPair which holds a record for each field in the report dataset master table and its value.
If hte field name of the custome rnumber = "tcDebtorCode" you can do the following:
You can run a loop over this temp-table:
for each ttDataRowPair no-lock:
if ttDataRowPair.fieldName = "tcDebtorCode"
then do:
/*your code to find the e-mail addresss via the customers Business Relation*/
lvc_email = Address.AddressEmail.
end.
end. /*each ttDataRowPair*/
run createParameter({&SYS_EMAIL}, lvc_email).
Hope that helps.
Mark
Chad Stone, modified 7 Years ago.
Re: How can I send invoices to specific customer email addresses using QRF?
Mark's suggestion is a good one. The reporting framework does not have any built-in integration with any email repositories in the QAD suite, so you would have to write code to get the desired emails from wherever they are stored (like in the example above where it says /*your code to find the e-mail addresss via the customers Business Relation*/)
Joseph Betts, modified 7 Years ago.
Re: How can I send invoices to specific customer email addresses using QRF?
Post Date: 10/10/18 (Bronze, 20 Posts) Recent PostsThank you very much Mark.
Perfect this makes sense. I shall try to make use of the dataset master table and implement a similar code. Will keep you updated.
Thanks again,
Joseph.
Message place holder
Forums