You need to sign in to do that
Don't have an account?

How to merge two cases that are duplicated
Hi,
i need to merge the two cases which are duplicated request ,how it can be achieved.please help me
some one told me that use appexcahnge application,but can i achieve the same without appexchange application?
1) for the cases that will be created from now on you can write an apex trigger to avoid duplicates.
2) for the duplicate cases that already exist you can write batch apex or dotnet or java application.
Thanks for the reply .
Will u provide some sample code for the apex triggers ,It will be more useful to me
for writing the apex trigger you need to know which fields on the case the duplicate cases in your organization.
say the fields are field1 and field2. you can write a trigger in the same lines as below
trigger dupcase on Case(before insert)
{
List<Case> liCase = [select id from Case where field1 = :trigger.new[0].field1 and field2 = :trigger.new[0].field2];
if (liCase.size() > 0)
{
trigger.new.adderror("duplicate case");
}
}
this is just the sample code and there can be syntax errors. and also you need to bulkify the code.
Thanks for the help,
But now this scenorio is changed, i need to merge the two cases which are duplicate requests.
How can i do that ?
Will u provide your suggestions ?
when do you want to perform this check (checking duplicates)?