Deltail vien Send pdf with mail in custom module

Hi I entered the send mail button in the Action menu in My custom module, as written in a topic as forums, this button works properly for the moment when you open the email that is not related to the contact as in a quote or an invoice.

Paese help me to relate the contact.


please i need help.

i Added the button send pdf with mail in my custom module, if i send the email with pdf, the mail composer not select the contact name and contact email to send. (in quotes this are allowed)

my module have relation from contact one to many (my module)

Hi Xoanon,

Please see generate pdf file and pass your contact id as per the quote module. I hope then it works.
You have copied only button now u should define your action as in Quotes to achieve this.



Many thanks to Arshath, because you made me guess to serach the code not in Email Compositing but in module AOS_PDF

Ok i passed several hours to solve this, now I have the pleasure to share with yours the solution.

I have copied the code of button in metadata/vardefs and i have added the code to view.detail.php, the botton pdf to mail work very well but the email c’ant relate to contact (when in my custo module there are a relation from contact)

NOW the solution

edit in crm root directory /modules/AOS_PDF_Templates/sendEmail.php
in line 49 we have

  else if(!empty($module->contact_id) && $module->contact_id!="")
            $contact_id = $module->contact_id;

i added this line after

else if(!empty($module->contacts_mymodulename_1contacts_ida) && $module->contacts_mymodulename_1contacts_ida!="")
            $contact_id = $module->contacts_mymodulename_1contacts_ida;

Because the relation is created by custom policies of suitecrm in another tab, and integrated to the module by dictionary.

I hope that is in help of all.

Thank you.