- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Feb 22, 2023 03:26 PM
Hi I've been working a script that is supposed to be finding and merging duplicate records but while it can find and delete the duplicates it is not actually updating them and I don't know why. The console does not give me any error messages. If anyone can help figure that out it would be much appreciated. The code is looking for duplicates in a table named "Script Testing" and is looking for duplicates in the "Name" column. The code is as follows

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Feb 23, 2023 05:55 AM
Have you tried using the DeDupe extension? It's worked wonders for me on numerous occasions.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Feb 23, 2023 01:12 PM
Heya, I think the issue is partly due to the code trying to get field data from a record.
Field data comes from the table object, not the record object.
// Loop through all fields in the duplicate
let duplicateFields = table.fields;
console.info(duplicateFields)
As a tip for debug, remember that you can use;
console.log("My Message");
console.info("My Info");
console.warn("My Warning");
console.error("My Error");
