Referencing OpenVPMS.customer.id from a reminder template [SOLVED]
Submitted by Ben_Charlton on Thu, 21/03/2019 - 17:34
I have a jrxml email template I am attempting to include a reference to the customer id.
I have tried adding fields
1. [openvpms:get(party:getPatientOwner(.),'id')]
2. OpenVPMS.customer.id
using either field gives an error unable to evaluate expression.
Failed to generate report KP_Vac_Reminder_Email.jrxml: Error evaluating expression for source text: $F{[openvpms:get(party:getPatientOwner(.),'id')]}
We are accessing for a reminder email template
interestingly
OpenVPMS.customer.lastName OpenVPMS.customer.firstName
both work fine
Re: Referencing OpenVPMS.customer.id from a reminder template
[openvpms:get($OpenVPMS.customer,'id')]
also causes the same error
Re: Referencing OpenVPMS.customer.id from a reminder template
Can you attach your template?
Re: Referencing OpenVPMS.customer.id from a reminder template
This template is working - but if I use the customer.id fields that are present it will error when used in Open
Re: Referencing OpenVPMS.customer.id from a reminder template
Try changing:
<field name="OpenVPMS.customer.id " class="java.lang.String"/>
to:
<field name="OpenVPMS.customer.id " class="java.lang.Long"/>
Re: Referencing OpenVPMS.customer.id from a reminder template
Thats bloody annoying really - given java has native toString() methods on all of those boxed objects.
Re: Referencing OpenVPMS.customer.id from a reminder template
Actually it still doesnt work - either declared with or without a `.toString() `
Re: Referencing OpenVPMS.customer.id from a reminder template
Resolved it Sorry _ I introduced a space when I made the change to LONG