SOLVED!!! Itās easy to add this feature to all emails to create new lead, contacts, opportunities, bugs and cases from ALL inbound emailā¦
In \modules\Emails\metadata\detailviewdefs.php
All of the options are there already for this feature. The problem is detailviewdefs.php is only used if the email has been imported already. If it has not been imported then another view is used:
\modules\Emails\metadata\nonimporteddetailviewdefs.php
Here these buttons are missing as is the include for the quick create. All that needs to be done is a few lines copied from detailviewdefs.php to nonimporteddetialviewdefs.php plus, the include for quickCreateModal.js and it works!!!
Just copy over these lines to nonimporteddetailviewdefs.php
array(
'customCode' => '<input type=button onclick="openQuickCreateModal(\'Bugs\',\'&name={$bean->name}\',\'{$bean->from_addr_name}\');" value="{$MOD.LBL_CREATE} {$APP.LBL_EMAIL_QC_BUGS}">'
. '<input type="hidden" id="parentEmailId" name="parentEmailId" value="{$bean->id}">'
),
array(
'customCode' => '<input type=button onclick="openQuickCreateModal(\'Cases\',\'&name={$bean->name}\',\'{$bean->from_addr_name}\');" value="{$MOD.LBL_CREATE} {$APP.LBL_EMAIL_QC_CASES}">'
. '<input type="hidden" id="parentEmailId" name="parentEmailId" value="{$bean->id}">'
),
array(
'customCode' => '<input type=button onclick="openQuickCreateModal(\'Contacts\',\'&last_name={$bean->name}\',\'{$bean->from_addr_name}\');" value="{$MOD.LBL_CREATE} {$APP.LBL_EMAIL_QC_CONTACTS}">'
. '<input type="hidden" id="parentEmailId" name="parentEmailId" value="{$bean->id}">'
),
array(
'customCode' => '<input type=button onclick="openQuickCreateModal(\'Leads\',\'&last_name={$bean->name}\',\'{$bean->from_addr_name}\');" value="{$MOD.LBL_CREATE} {$APP.LBL_EMAIL_QC_LEADS}">'
. '<input type="hidden" id="parentEmailId" name="parentEmailId" value="{$bean->id}">'
),
array(
'customCode' => '<input type=button onclick="openQuickCreateModal(\'Opportunities\',\'&name={$bean->name}\',\'{$bean->from_addr_name}\');" value="{$MOD.LBL_CREATE} {$APP.LBL_EMAIL_QC_OPPORTUNITIES}">'
. '<input type="hidden" id="parentEmailId" name="parentEmailId" value="{$bean->id}">'
),
Plus This one in the includes array and thatās it!!
array(
'file' => 'modules/Emails/include/DetailView/quickCreateModal.js',
),
Iām wondering if I should add a PR for this one, it seems like it was just forgot?