Hi All,
I have a requirement, where I need to find the duplicate contact from dynamics and need to send the list of duplicate contacts to user.
All I have done, through the logic like first I have sort the output of list rows and then comparing(email column) second row to first and third to second and fourth to third and so on. So like this I got Unique and Duplicate contacts list.
But issue is that, Like I need to the all duplicate itmes inside the duplicate list but here it is giving one item in unique list and rest of the duplicate item in duplicate list.
for example: Array=[A,A,A,B,B,C,C,D,E] then it is giving
Unique Array=[A,B,C,D,E]
Duplicate Array=[A,A,B,C]
But It should be
Duplicate Array =[A,A,A,B,B,C,C]
Unique Array=[D,E]
Can someone please suggest me a way to achieve this ?