Referencing OpenVPMS.customer.id from a reminder template [SOLVED]

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 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Referencing OpenVPMS.customer.id from a reminder template

[openvpms:get($OpenVPMS.customer,'id')]

 

also causes the same error

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

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

AttachmentSize
KP_Vac_Reminder_Email.jrxml 11.4 KB
Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

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.

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Referencing OpenVPMS.customer.id from a reminder template

Actually it still doesnt work - either declared with or without a `.toString() `

 

Failed to generate report KP_Vac_Reminder_Email.jrxml: Error evaluating expression for source text: "https://www.kalingaparkvetsurgery.com.au/index.php/client-detail-update-page/?&lastname="+$F{OpenVPMS.customer.lastName}+"&firstname="+$F{OpenVPMS.customer.firstName}+"&your_email="+$F{[party:getEmailAddress($OpenVPMS.customer)]}+"&clientid="+$F{OpenVPMS.customer.id }.toString()
Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Referencing OpenVPMS.customer.id from a reminder template

Resolved it Sorry _ I introduced  a space when I made the change to LONG

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content