Delete Duplicate Records In table level

Hi,

I want Delete Duplicate Records In table level i am using this DeleteDuplicate()…

its working…is there any another way to delete duplicate records…

static void DeleteDuplicate(Args _args)
{
Set fieldset = new set(types::Integer);

DictIndex dictIndex = new dictIndex (tablenum(PurchTable), indexnum(PurchTable,PurchIdx));

;

fieldset.add(fieldnum(PurchTable ,OrderAccount));

ReleaseUpdateDB::indexAllowDup(dictIndex);

ReleaseUpdateDB::deleteDuplicatesUsingIds(tablenum(PurchTable),0,fieldset);

ReleaseUpdateDB::indexAllowDup(dictIndex);

info(“Deletion done”);

}

Thanks,

SureSh

oopsssss

Hi SureSh,

It’s not working when i try it.