Hi all, Has anyone faced an issue before with tem...
# advancedpdf
m
Hi all, Has anyone faced an issue before with templates where it shows up correctly if you print it directly from a certain record, but if you sent it in an email, some variables don't get populated, and don't show up?
j
are you sending as an attachment? what's not showing up?
m
As an attachment, yes. Some info that comes from the
subsidiary
object.
j
How are you referencing the subsidiary object?
m
Copy code
<td align="left" rowspan="3" line-height="110%" style="width: 25%;">
	${subsidiary.legalname}<br />
	${subsidiary.mainaddress.addr1}<br />
	${subsidiary.mainaddress.zip} ${subsidiary.mainaddress.city}<br />
	${subsidiary.mainaddress.country}
</td>
r
From my experience no not yet as we use the same template to print and email. Which record are you emailing from and which subsidiary info is it so I can test myself.
Try using ${subsidiary.mainaddress_text} as I use it in all my forms without issue.
m
Will give it a try. Thanks 🙏
l
Are you sure you're using the same template in the Print Template and Email Template fields in the custom form?
m
Yes, there is no other template in the same structure. Unless a teammate did something. I will check it.
i
I have a similar issue, a customized field is shown in the print pdf, but not in the email attachments. Both print and email using the same template. If you have found a solution, please share it
r
Please provide the line of code you're using and which record transaction it is.
i
Good morning, As I was looking in the code to send it to you, I realized I added the customized field in a switch-case, only for the default, and the print was using it, while the email sent with a different case. I add it to all, and issue was solve. Thank you for your help