In invoice i have pdf to be print . In that How do...
# advancedpdf
s
In invoice i have pdf to be print . In that How do I get a custom field from address subrecord (shipping address) from customer ? record.entity.addressbook.addressbookaddress.customfield did not work. Please help
n
how are you referencing the shipping address currently it might be as simple as shippingaddress.my__custom_field
s
Hi @NElliott taking the 'shipaddress' field in invoice for the shipping address value . But this custom field is in the address subrecord and not a part of 'shipaddress' in invoice right ?
n
How are you outputting the address details currently such as post code / city?
Also if you flip to the WYSIWYG editor it might help you figure out the field id. If it's visible in the list, select it and then switch to the editor and you should see the detail you need.
👍 1
s
I'm just taking the value from the Ship To address field (type : address, Id : 'shipaddress') in the invoice. Not particularly taking zip code or City
n
Ah so you're just plugging in "shipaddress" as a blob of text. Sorry without going off and looking at a ADV PDF template myself I'm not sure. Have you tried looking at the WYSIWYG editor though as I suggested? I cannot recall if the object you need is included, it might not be. If not, you may need to wait for someone else to reply or go the custom field route using a UE script.
s
Ill try and update .
n
Also have you tried just using "record." + your custom field id?
WHen I hover over this it shows record.shipaddr2 for instance...
s
Got it @NElliott. I think this way I could search for the custom record id directly
n
Do you mean custom field?
s
Yeah custom field in address subrecord.
👍 1
I did the same way you sent the screen shot . Im getting ${record.shippingaddress.custrecord_custom_message}
Ill print this and update you
n
How'd it go?
s
Got the field . But the value in it doesn't show up 🥲
n
And it's definitely the correct shippingaddress record being referenced with a value in that custom field?
s
I tried to get the zip value by record.shippingaddress.zip. and I got the right value . But not this custom field . Fishy!
Yeah it's the right address.
n
If you navigate to the record directly through the UI can you see teh value. I'm wondering if there's something related to the form used on that record, maybe it's not exposed on the form. I could be over thinking it though, there might be a simpler reason...