+ Start a Discussion
RagsehRagseh 

How to Prevent duplicate case creation using Messaging.InboundEmailHandler

Hi All,
Can any one guide me how to prevent duplicate case creation using Messaging.InboundEmailHandler . 
The business scenario is customer send a mail by removing case thread id from the subject and description of the email and instead of thread id customer put case number on the subject and enquire about the case.
bk sbk s
If the steps are clear you can use the below steps to make sure you dont create duplicate case ,

1. Read the subject 
2. Does it have case Number? if so collect the case Number and Query with case object
3. if List<Case> size >0? it is existing , else its new