1

I need to add Email module tab on Sales Order module.

I have added one columns on vtiger_relatedlists table. i got tab on salesorder module but when i am click on that link. no data is display.

also i need to add Send Email Button on SalesOrder Module.

Please let me know if any one have idea one this

Thanks in advance

1 Answers1

1

Step1: You have to copy below functions from Account module file (modules/accounts/account.php) to your module's main file

  • getRelatedContactsIds
  • get_emails

Step2: And run below query for your module

Query

insert into vtiger_relatedlists (relation_id, tabid, related_tabid, name, sequence, label, presence, actions) values('225','53','10','get_emails','4','Emails','0','add');

PrincyV
  • 138
  • 1
  • 10
  • Hello Sasha, Now i have added both function on SaleOrder Module now i can see the grid on related tab. Also i can send an email from Add Email functions... but after sending an email i can not see the sent mail in related tab list. also, i want to display Send Email Button same like Lead module. if you have any idea than please share its help us lot...:D – Ketan Panchal Jun 29 '16 at 07:13
  • I am facing the same issue here while linking the email with the module which you have integrated with. Refer my Question here - http://stackoverflow.com/questions/38092449/how-to-relate-any-email-with-custom-module-data-in-vtiger-crm – PrincyV Jun 29 '16 at 07:19
  • i have seen your post.. how you can add custom module name in pick list dropdown? i m talking about 'Recruit' ... – Ketan Panchal Jun 29 '16 at 09:31
  • You need to Add your custom module into vtiger_ws_referencetype table. like: **insert into vtiger_ws_referencetype(fieldtypeid,type) values (34,'custommodulename');** – PrincyV Jun 29 '16 at 09:43
  • actually i have to display SalesOrder module in this Pick list..instead of Custom module .. i have insert data in **referancetype** table but it will not appear on pick list. – Ketan Panchal Jun 29 '16 at 10:02
  • Your query should be exactly like `insert into vtiger_ws_referencetype(fieldtypeid,type) values (34,'SalesOrder');` Do not change the fieldtypeid other than 34 - Hope that helps – PrincyV Jun 29 '16 at 10:21
  • I have inserted data as you told but still SalesOrder module is not display on my pick list. Please check below screenshort [link]http://screencast.com/t/Ojt6oLFrj – Ketan Panchal Jun 29 '16 at 10:35
  • Sorry for the last comment! That query will enable the module in other places in Dropdown. To add SalesOrder into the select box, it must have any custom field with Type as "email", then it will start displaying here in this list. Just add a field with type as email.. it should work – PrincyV Jun 29 '16 at 10:50
  • I have add one custom field email in **salesordercf** table but still it will not appear in drop down :( – Ketan Panchal Jun 29 '16 at 11:15
  • ohh.. forgot to update UItype in field table..now updated on table.. its working fine.. really appreciate your help on this... but i will send an email with this now.. but after i have sending an email.. in grid nothing is display.. Please see below screenshort http://screencast.com/t/w3fD0cH5fgx – Ketan Panchal Jun 29 '16 at 11:20
  • That's where you are coming to the issue where i am stuck! [http://stackoverflow.com/questions/38092449/how-to-relate-any-email-with-custom-module-data-in-vtiger-crm] You need to go to that email edit and link your salesorder entry with that email. Then only it will appear into your grid. The issue is when I try to link my "Recruit" entity with email, the listing doesn't appear; so I can't link and therefore it doesnt appear in my grid. – PrincyV Jun 29 '16 at 11:28
  • You are right !! keep posted here if you find any solution or if i will find any alternate way than i will update you. – Ketan Panchal Jun 29 '16 at 11:35
  • Hello Sasha now , the data is display for an email related tab also display email list of related module while compose an email Please see below screen short http://screencast.com/t/t77gdIf7L6z8 http://screencast.com/t/T82nlpZXoBT – Ketan Panchal Jun 29 '16 at 12:40