function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael ZaitsevMichael Zaitsev 

Email To Case using Accounts

Hi Developers, 

Need your assistance with the issue we have with email to case.

All communication made to us made by emails, but we are missing many aspects we can use having accounts.
once email send we want to have account info to be inherit by the new generated case.

If there is an option to create an account from new generated case i would like to know how to do it.

I was adviced that there is an option of creating a triger.

Will appreciate your assitance with the below.

Michael 
Best Answer chosen by Michael Zaitsev
Keyur  ModiKeyur Modi
Hi,
trigger createAccount on case (after Insert){

Account acc=new account();
// give the data  to account
acc.Name='give account name as per your requirement 
acc.Type=
}

please let me know if this will help

Thanks,
Keyur Modi
 

All Answers

Keyur  ModiKeyur Modi
Hi,
 you can achieve this requirment through Trigger on case level, where  you can create trigger on Insert event and you can create the account as well.

plese let me know if this will help you.

Thanks,
Keyur Modi
Michael ZaitsevMichael Zaitsev
Hi Modi,

thank you very much for the swift reply, can you please share some details on how to do it, as I'm not a developer and need some guideline :) 

Michael
Keyur  ModiKeyur Modi
Hi,
trigger createAccount on case (after Insert){

Account acc=new account();
// give the data  to account
acc.Name='give account name as per your requirement 
acc.Type=
}

please let me know if this will help

Thanks,
Keyur Modi
 
This was selected as the best answer
Michael ZaitsevMichael Zaitsev
thank you, few more question :)

how to avoid duplicates ( if account is already created)? how i know what fields will be taken ?

Best Regards, Michael 
Michael ZaitsevMichael Zaitsev
what I'm missing here ?

case trigger
Keyur  ModiKeyur Modi
Hi,
For the duplication you can check the account name.

and you can enter the detail like Account Name, Phone, Email and related detail from the case.

Thanks,
Keyur Modi