Good Afternoon!
I am attempting to use the remove duplicates scripting app to remove the older record of a duplicate. I chose the date created as the comparison field but the script is currently removing the newer of a set of duplicates. I believe below is the block of code that needs to be modified, but I do not know how. If anyone can help, it would be greatly appreciated. Have a great day!
if (key in existing) {
let { keep, discard } = choose(record, existing[key]);
toDelete.push(discard);
existing[key] = keep;