Print Account Name on PDF Template of a custom Module

HI everyone,

I did a custom module for my SuiteCRM which is called Purchase Order. I added the code in the CRM to add the option to print a PDF of that module (Purchase Order). In this module, I’ve made a relationship with the Account Module. Every field is printing correctly except for the one linked with the module Account. I tried to do some debugging but i can’t seem to find the place where the call to the database is made to replace the name for the actual value. Someone has any clue? The Mapping seems to be good because they took off the name of the field from the template. Best way is maybe to use xdebug to find the problem

See my attachments.

Blue Arrow : Account shipping address
Red Arrow : Account Billing address
Black Arrow : Account Name.

Thank you very much

There are a few open Issues on Github regarding variable substitution in PDF templates.

But I am not even sure this handles related fields. Have you tried any related field in PDF templates, on a core module? I mean, not your own custom module.

1 Like

I Have tried the related field in the pdf template and it was working well. I change the relationship to a relate input instead on my custom module and it’s working like a charm now. Thank you very much

Hi! Can you plase say what execuly did u do to make related fields appear in pdf template from yours custom module?