Suitecrm email client ....... how to create any record (lead, contact, etc) manually directly in 7.10.2

Before upgrade to 7.10.2 i was able to manually create any record (lead, contact, opportunity, case, task etc) directly from the suitecrm built-in email client by pressing a button ā€œQUICK CREATEā€ System automatically fills up the new ā€˜record creation formā€™ (lead, contact, opportunity, case, task etc) with the information given in that email.

but after the upgrade i am unable to see this ā€œQUICK CREATEā€ button, so there is no way to create any record. Email client layout is different and it has only the option to import email into the suitecrm database.

I wonder, if this upgrade has removed this option altogether or am i missing something.
This function is very important for me because i create leads, contact, etc directly and manually from inbound emails and later assign it to my team.

Thanks in advance.

You donā€™t mention which version you were running beforeā€¦

Starting from 7.9.0 there is a new email client, so yes, there are differences.

1 Like

Thanks for the quick reply. I was using 7.7 earlier.

Do you confirm that the required function to create any new record directly from the email inbox is not present in the latest version ? If yes, then please advise how do I can I create new records from emails.

Thanks

I am not very familiar with the email module. So I might be missing something.

I think itā€™s the Import function, where you can ā€œrelate toā€ some record. Although itā€™s not as convenient as the old function.

Try looking in the Documentation to see if you can find something on this.

https://docs.suitecrm.com/user/core-modules/emails/#_import_mail

Also look into ā€œgroup emailā€ accounts which have more logic about parsing the email and trying to auto-relate to records, I believe.

Well, i do understand that in case if some record ( lead, contact, opportunity, case, task etc ) already exists in our system, we are able to create a relationship when importing email into the system. But in case if we want to create a new record altogether, there is no option available now in the latest release. However it was available in earlier versions.

I believe that team at suitecrm is missing this important functionā€¦

In a real environment, We get an email from someone interested in our product, we want to create a lead from that email. This is a very common situation for many small businesses. I want other users to please confirm if this is possible in anyway ?

You are right, it is convenient and it would be nice to still have that option there. You can open an Issue on GitHub with this suggestion.

https://github.com/salesagility/SuiteCRM/issues

I know this is an old thread, but just wondering if this is possible? Or anyone solved it? Iā€™m looking at the inbound email and this functionality appears to be there, but only for emails already imported? Itā€™s kind of weird. If the email is not already imported, you donā€™t get these options. Anyone know whatā€™s going on with this before I have to go full Sherlock Holmes on this one?

image

Looks like the functionality is built, I get a popup to create the new record:

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?

Nice.

I wonder if there are any issues due to the emails not being imported? For example, I assume the code will not just create a new Lead, but also relate it to the Email. Is there any trouble with this if the Email is not there?

That would be ideal, but the code only creates the record and then gives you the option to return to the record or the email. You would then have to import the email and attach it to the record you just created. I know what youā€™re thinking, why not just import it first? Well the use case for this is lets say a client emails you a problem. You want to attach the email to the case, but there is no case to attach it to. Or for example, you get an email from a referral " abc co. referred me to you" and you want to attach it to the lead, but there is no lead yet. You will now have the option to create the lead right there and then attach it (import).

i agree though ideally it would automatically get imported and related to the record you just created. Iā€™m going to see how hard it would be to hook into the import function if thatā€™s possible because that would absolutely make this process easier.

1 Like
1 Like