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
SalesforcerSalesforcer 

Avoid multiple records ??

I have a flow that is creating email to case records and I have currently 4 verified email service addresss, but when I select more than one service address on To Address for email to case it's creating multiple records with the the same owner and record type how I can prevent this?
Abdul KhatriAbdul Khatri
Hi,

Will you be able to share the flow?

You may loop through around your To Address, My guess. Won't be able to help much unless review the flow.

Regards,
SubratSubrat (Salesforce Developers) 
Hello ,

Please share the screen shot for your flow to help further.

Thank you.
Loren GibsLoren Gibs
To prevent the creation of multiple records with the same owner and record type, you can implement the following steps:
Create a custom field on the Case object to store the email service address that was used to create the case.
In your email to case flow, use a Decision element to determine the email service address used in the incoming email and set the value of the custom field created in step 1 accordingly.
Use a Record Lookup element in your flow to search for existing cases with the same email service address, subject, and owner.
If a matching case is found, update the existing case instead of creating a new one. You can use a Record Update element for this purpose.
If no matching case is found, proceed with creating a new case as usual.
By implementing these steps, you can ensure that only one case is created per email service address, subject, and owner combination, even if multiple email addresses are included in the To field of the incoming email. https://my-accountaccess.com/