Skip to main content

Viewing and Editing Potential Duplicates Before AutoMerging

The duplicate list views are a great way to validate and merge many duplicate sets at once, but that work is usually a one-off activity performed by someone who doesn't own or work with the records on a daily basis.

The Potential Duplicates web resource takes the opposite approach: it flags potential duplicates to your end users in the course of their daily work, right on the form.

Duplicate notification and Potential Duplicates subgrid on a Contact form

Why put duplicates on the form​

The best reason to surface duplicates this way: end users can clean up records as they come across them in their daily work, right when they have the context to fix the data correctly. A salesperson gets a call, looks the contact up, and finds three records; the Potential Duplicates subgrid lets them fix the data on the spot, because they have the actual customer on the phone at that moment. As you'll see below, they can either choose which fields to preserve across the whole duplicate set, or edit individual values on any of the records directly.

Surfacing duplicates on the form lets them act at the moment they encounter the problem. The alternative, an IT or analyst-type person working through them en masse from a list view, is not politically feasible in many organizations, however efficient it may be.

What users can do from the subgrid​

The record you're currently viewing is shown in bold, alongside a notification banner and the same three buttons as the list views:

ActionEffect
Make WinnerPromotes this record to Rank 1. See Set Primary
IgnoreRemoves the record from its set and future analyses
AutoMergeMerges the set from here, no list view needed

A few things beyond the list views make the subgrid worth having on the form:

  • Jump to another record. The Open button on each of the other records opens that record so the user can look at it directly before deciding. If the user lands on one of the loser-designates (Rank > 1), they'll usually want to jump straight to the winner-designate instead.
  • Field chooser to force preservation of that particular value during the AutoMerge. Each column shows every duplicate's value for that field as a selectable button. By default, the first record, in rank order, with a non-null value is pre-selected for you. Users can pick a different record's value for any field, then press the small AutoMerge button at the top left of the subgrid to apply the field preservation selections and merge the set. The first time a user does this, it can take a few seconds: Dynamics needs to cache the AutoMerge plugin code before it runs. Navigating away before clicking AutoMerge loses those selections; they aren't saved.
  • Fields are editable inline. Double-click any field to edit it directly in the grid; the change applies as soon as you leave the field. Editing a field's value doesn't select it to win the merge, those are two separate actions.
In summary

Single-click to designate a field for preservation, and double-click to edit the value directly. Fields not defined in this subgrid, and so not available to choose a value for, are preserved the same way as in the list-view AutoMerge: non-empty values on losing records fill any empty fields on the winner.

Why you can't see it yet​

The subgrid ships on the "AutoMerge" form in our managed solution, and that form is visible only to users with Administrator or Customizer privileges.

That's deliberate, not an oversight. It keeps the component hidden from end users until you've decided how and where to expose it to them, rather than surfacing duplicate warnings on everyone's forms the moment the solution is imported.

Getting it onto your forms​

Someone with customization privileges places the web resource on the forms your organization actually uses, the same step required for the AutoMerged records subgrid.

Customizing the subgrid with the Custom Parameters JSON​

The subgrid is fully customizable, including which fields (columns) appear when comparing potential duplicates, all through one place: the Custom Parameters (data) field you fill in when you add the web resource to a form. The JSON you put there tells the web resource which fields to show, how to label the buttons, and how to filter and order the records.

Here's an example, customizing a Contact form:

Web Resource Properties dialog showing the Custom Parameters (data) field where this JSON goes

Default Custom Parameter(data) JSON for Contact forms
{
"Instructions": "https://automerge.com/pds",
"targetEntityLogicalName": "contact",

"notificationText-comment": "Shown at the top of the form while the record has duplicates; {0} is how many.",
"notificationText": "AutoMerge found {0} potential duplicate(s).",

"notificationLevel-comment": "INFO | WARNING | ERROR: the kind of that notification.",
"notificationLevel": "WARNING",

"fieldList-comment": "The columns, each [label, field]; a third value: Lookup, or a date format such as MM/DD/YYYY. The rank shows in each row, so it needs no column; an address block's first field is marked *.",
"fieldList": [
["Match", "gnb_automergematchtype"],
["Precision", "gnb_automergematchprecisionsingle"],
["First", "firstname"],
["Last", "lastname"],
["Email", "emailaddress1"],
["Mobile", "mobilephone"],
["BizPhone", "telephone1"],
["Street 1", "address1_line1"],
["City", "address1_city"],
["ZIP", "address1_postalcode"]
],

"rowSize-comment": "sm | md | lg: row height, 28px | 34px | 40px.",
"rowSize": "md",

"showCurrentRecord-comment": "false leaves the record on this form out of the list (unless it is the winner). It is merged with its set either way.",
"showCurrentRecord": true,

"isClickable-comment": "true shows the Open button on the other records.",
"isClickable": true,

"openRecordNewWindow-comment": "true opens records in a new window; false in place of this form.",
"openRecordNewWindow": false,

"autoMergeButtonText-comment": "Blank: the AutoMerge icon only. Text: the icon followed by the text (was \"AutoMerge\").",
"autoMergeButtonText": "",

"setPrimaryButtonName-comment": "Blank: the Make winner icon (up arrow) only. Text: the icon followed by the text (was \"MakeWinner\").",
"setPrimaryButtonName": "",

"ignoreButtonName-comment": "Blank: the Ignore icon (red X) only. Text: the icon followed by the text (was \"Ignore\").",
"ignoreButtonName": "",

"confirmBeforeMergingSingleSet-comment": "true asks before AutoMerge.",
"confirmBeforeMergingSingleSet": false,

"dragAndDropOntoValue-comment": "ask | replace | swap: what dropping a value onto another value does (ask offers the choice).",
"dragAndDropOntoValue": "ask",

"orderFields-comment": "The order of the rows under the winner, each [field, \"asc\" or \"desc\"]. Merging still goes by rank.",
"orderFields": [
["gnb_automergerank", "asc"],
["gnb_automergematchprecisionsingle", "desc"]
],

"queryParameters-comment": "Which set shows: the record's tag, active records, and a set precision of 80 or more. The set that shows is always shown whole. ## takes the value from the record on this form.",
"queryParameters": [
{"Filter1": "gnb_automergetag", "FilterType1": "String", "FilterValue1": "##gnb_automergetag"},
{"Filter2": "statecode", "FilterType2": "OptionSet", "FilterValue2": "0"},
{"Filter3": "gnb_automergematchprecisionset", "FilterType3": "Number", "FilterOperator3": "ge", "FilterValue3": "80"}
]
}
Default Custom Parameter(data) JSON for Account forms
{
"Instructions": "https://automerge.com/pds",
"targetEntityLogicalName": "account",

"notificationText-comment": "Shown at the top of the form while the record has duplicates; {0} is how many.",
"notificationText": "AutoMerge found {0} potential duplicate(s).",

"notificationLevel-comment": "INFO | WARNING | ERROR: the kind of that notification.",
"notificationLevel": "WARNING",

"fieldList-comment": "The columns, each [label, field]; a third value: Lookup, or a date format such as MM/DD/YYYY. The rank shows in each row, so it needs no column; an address block's first field is marked *.",
"fieldList": [
["Match", "gnb_automergematchtype"],
["Precision", "gnb_automergematchprecisionsingle"],
["Name", "name"],
["Email", "emailaddress1"],
["MainPhone", "telephone1"],
["OtherPhone", "telephone2"],
["Street 1", "address1_line1"],
["City", "address1_city"],
["ZIP", "address1_postalcode"]
],

"rowSize-comment": "sm | md | lg: row height, 28px | 34px | 40px.",
"rowSize": "md",

"showCurrentRecord-comment": "false leaves the record on this form out of the list (unless it is the winner). It is merged with its set either way.",
"showCurrentRecord": true,

"isClickable-comment": "true shows the Open button on the other records.",
"isClickable": true,

"openRecordNewWindow-comment": "true opens records in a new window; false in place of this form.",
"openRecordNewWindow": false,

"autoMergeButtonText-comment": "Blank: the AutoMerge icon only. Text: the icon followed by the text (was \"AutoMerge\").",
"autoMergeButtonText": "",

"setPrimaryButtonName-comment": "Blank: the Make winner icon (up arrow) only. Text: the icon followed by the text (was \"MakeWinner\").",
"setPrimaryButtonName": "",

"ignoreButtonName-comment": "Blank: the Ignore icon (red X) only. Text: the icon followed by the text (was \"Ignore\").",
"ignoreButtonName": "",

"confirmBeforeMergingSingleSet-comment": "true asks before AutoMerge.",
"confirmBeforeMergingSingleSet": false,

"dragAndDropOntoValue-comment": "ask | replace | swap: what dropping a value onto another value does (ask offers the choice).",
"dragAndDropOntoValue": "ask",

"orderFields-comment": "The order of the rows under the winner, each [field, \"asc\" or \"desc\"]. Merging still goes by rank.",
"orderFields": [
["gnb_automergerank", "asc"],
["gnb_automergematchprecisionsingle", "desc"]
],

"queryParameters-comment": "Which set shows: the record's tag, active records, and a set precision of 80 or more. The set that shows is always shown whole. ## takes the value from the record on this form.",
"queryParameters": [
{"Filter1": "gnb_automergetag", "FilterType1": "String", "FilterValue1": "##gnb_automergetag"},
{"Filter2": "statecode", "FilterType2": "OptionSet", "FilterValue2": "0"},
{"Filter3": "gnb_automergematchprecisionset", "FilterType3": "Number", "FilterOperator3": "ge", "FilterValue3": "80"}
]
}
Default Custom Parameter(data) JSON for Lead forms
{
"Instructions": "https://automerge.com/pds",
"targetEntityLogicalName": "lead",

"notificationText-comment": "Shown at the top of the form while the record has duplicates; {0} is how many.",
"notificationText": "AutoMerge found {0} potential duplicate(s).",

"notificationLevel-comment": "INFO | WARNING | ERROR: the kind of that notification.",
"notificationLevel": "WARNING",

"fieldList-comment": "The columns, each [label, field]; a third value: Lookup, or a date format such as MM/DD/YYYY. The rank shows in each row, so it needs no column; an address block's first field is marked *.",
"fieldList": [
["Match", "gnb_automergematchtype"],
["Precision", "gnb_automergematchprecisionsingle"],
["First", "firstname"],
["Last", "lastname"],
["Company", "companyname"],
["Email", "emailaddress1"],
["Mobile", "mobilephone"],
["BizPhone", "telephone1"],
["Street 1", "address1_line1"],
["City", "address1_city"],
["ZIP", "address1_postalcode"]
],

"rowSize-comment": "sm | md | lg: row height, 28px | 34px | 40px.",
"rowSize": "md",

"showCurrentRecord-comment": "false leaves the record on this form out of the list (unless it is the winner). It is merged with its set either way.",
"showCurrentRecord": true,

"isClickable-comment": "true shows the Open button on the other records.",
"isClickable": true,

"openRecordNewWindow-comment": "true opens records in a new window; false in place of this form.",
"openRecordNewWindow": false,

"autoMergeButtonText-comment": "Blank: the AutoMerge icon only. Text: the icon followed by the text (was \"AutoMerge\").",
"autoMergeButtonText": "",

"setPrimaryButtonName-comment": "Blank: the Make winner icon (up arrow) only. Text: the icon followed by the text (was \"MakeWinner\").",
"setPrimaryButtonName": "",

"ignoreButtonName-comment": "Blank: the Ignore icon (red X) only. Text: the icon followed by the text (was \"Ignore\").",
"ignoreButtonName": "",

"confirmBeforeMergingSingleSet-comment": "true asks before AutoMerge.",
"confirmBeforeMergingSingleSet": false,

"dragAndDropOntoValue-comment": "ask | replace | swap: what dropping a value onto another value does (ask offers the choice).",
"dragAndDropOntoValue": "ask",

"orderFields-comment": "The order of the rows under the winner, each [field, \"asc\" or \"desc\"]. Merging still goes by rank.",
"orderFields": [
["gnb_automergerank", "asc"],
["gnb_automergematchprecisionsingle", "desc"]
],

"queryParameters-comment": "Which set shows: the record's tag, active records, and a set precision of 80 or more. The set that shows is always shown whole. ## takes the value from the record on this form.",
"queryParameters": [
{"Filter1": "gnb_automergetag", "FilterType1": "String", "FilterValue1": "##gnb_automergetag"},
{"Filter2": "statecode", "FilterType2": "OptionSet", "FilterValue2": "0"},
{"Filter3": "gnb_automergematchprecisionset", "FilterType3": "Number", "FilterOperator3": "ge", "FilterValue3": "80"}
]
}

The -comment entries are notes for whoever edits the JSON; the web resource ignores them, so you can leave them in or delete them.

What each setting does​

Which records appear

  • targetEntityLogicalName: the table the form belongs to (contact, account, or lead).
  • queryParameters: the filters that pick which records appear. Each filter is numbered (Filter1, FilterType1, FilterValue1, and so on) and names a field, its type, and the value to match.
    • FilterType is one of String, OptionSet (a choice field such as Status), Number, or Lookup.
    • FilterOperator applies to Number filters only: eq (equal), ne (not equal), gt (greater than), ge (greater than or equal), lt (less than), le (less than or equal).
    • A FilterValue starting with ## takes its value from the record open on the form. ##gnb_automergetag is what limits the subgrid to the current record's own duplicate set.
    • The set that shows is always shown whole.
  • orderFields: the order of the rows under the winner, as [field, direction] pairs applied in turn. Direction is asc (lowest first) or desc (highest first). The default sorts by Rank, then by Precision highest first. Merging still goes by rank, whatever the row order.

Columns and layout

  • fieldList: the columns, each written as [label, field]: the heading shown in the subgrid, then the field's logical name. For a date field, add the date format to display as a third value, such as MM/DD/YYYY (see Date columns in fieldList); lookup fields need no third value (see Lookup columns in fieldList). Each row already shows its rank, so rank needs no column. The first field of an address block is marked with *.
  • showCurrentRecord: true includes the record you're viewing (shown in bold) in the list. false leaves it out, unless it is the winner; it is merged with its set either way.
  • rowSize: row height: sm (28 pixels), md (34 pixels), or lg (40 pixels).

Addresses and unique fields

  • allowAddressBlockSplit: whether the fields of an address can be chosen separately in the grid. AutoMerge treats an address as a block: street, city, state, postal code and the rest stay together, so the surviving record never ends up with a street from one record and a city from another. Which fields make up a block is defined in your AutoMerge settings (Address Block 1, 2 and 3).

    • false (default): the address stays whole. The grid pre-selects the address from the highest-ranked record that has a street, and clicking any address value on another record moves the entire address to that record. On merge, the whole address is copied to the surviving record, including address fields not shown as columns in the grid.
    • true: the address still starts out whole, but each address field can be chosen on its own. Clicking a value moves only that field. On merge, each chosen value is copied individually, and address fields not shown in the grid are left as they are on the surviving record.

    Leave this set to false unless you have a specific reason to mix address values from different records.

  • alternateKeys: the fields on this table that are alternate keys, meaning fields whose value must be unique across records. When a merge moves one of these values from a losing record to the surviving record, the two records would briefly hold the same value and the system would reject the update as a duplicate. With the field listed here, AutoMerge clears the value on the losing record first, then writes it to the surviving record. Enter the logical names as one comma-separated list with no spaces, for example "emailaddress1,new_membernumber". Leave it empty ("") if the table has no alternate keys, or if none of them appear as columns in the grid.

Buttons and behavior

  • isClickable: true shows the Open button on the other records.
  • openRecordNewWindow: true opens that record in a new window; false opens it in place of the current form.
  • autoMergeButtonText, setPrimaryButtonName, ignoreButtonName: the text on the AutoMerge, Make Winner (up arrow), and Ignore (red X) buttons. Leave blank ("", the default) to show the icon only; enter text to show the icon followed by that text.
  • confirmBeforeMergingSingleSet: true asks the user to confirm before AutoMerge runs.
  • dragAndDropOntoValue: what happens when the user drags a value and drops it onto another value: replace, swap, or ask (the default, which offers the choice).

Notification banner

  • notificationText: the banner message. {0} is replaced with the number of potential duplicates found.
  • notificationLevel: the banner style: INFO, WARNING, or ERROR.
Hiding low-precision matches from end users

Filter3 in queryParameters limits the subgrid to sets at or above a given Precision % (gnb_automergematchprecisionset, here 80). End users usually don't know what "precision" means, and merging a low-precision set that turns out to be a false match is hard to undo, so keeping FilterValue3 at 80 or higher is prudent: it keeps the subgrid limited to sets you're confident enough to let end users merge on their own.

Date columns in fieldList​

A column in fieldList is [label, field]. For a date or date-and-time field you can add a third value: the format the date is shown in. For example:

["Created", "createdon", "MM/DD/YYYY"]
["Last contact", "lastusedincampaign", "YYYY-MM-DD HH:mm"]

The format uses Moment.js format tokens (the standard the web resource uses to show dates). The full list is in the Moment.js documentation.

The tokens you will use most:

TokenShowsExample
YYYYyear, 4 digits2026
YYyear, 2 digits26
MMmonth, 2 digits10
Mmonth10
MMMmonth, short nameOct
MMMMmonth, full nameOctober
DDday of month, 2 digits09
Dday of month9
dddweekday, short nameMon
ddddweekday, full nameMonday
HHhour, 00-2314
hhhour, 01-1202
mmminutes05
AAM or PMPM
Lthe user's own short date format10/19/2026
LTthe user's own short time format2:05 PM

Things to know:

  • Letters are case-sensitive: MM is the month, mm is minutes; DD is the day of the month, dd is the weekday. Use YYYY for the year, not yyyy.
  • Text that should appear as it is goes in square brackets: "DD MMM YYYY [at] HH:mm" shows "19 Oct 2026 at 14:05".
  • Dates are shown in the user's own time zone (the browser's).
  • An empty date stays empty.
  • Lookup fields are recognized automatically, so the third value is only needed for a date format. See Lookup columns in fieldList.
  • The same applies to the fieldList in the table sections of the AutoMerge Other Settings, which the duplicate sets page uses when useDefaultFields is true. When the page takes its columns from a view instead, dates are shown as Dynamics formats them.

Lookup columns in fieldList​

A lookup field points at another record: a contact's Company (parentcustomerid), a record's Owner (ownerid), an account's Primary Contact (primarycontactid). Add it to fieldList like any other column, with its logical name:

["Company", "parentcustomerid"]
["Owner", "ownerid"]

AutoMerge recognizes lookup fields automatically. Older settings may say Lookup as a third value, as in ["Company", "parentcustomerid", "Lookup"]; that still works, but is no longer needed.

How a lookup column behaves:

  • It shows the name of the record it points at, such as the company's name.
  • Click a value to keep it: AutoMerge then points the surviving record at that same record. Lookups that can point at more than one table (Customer, Owner) keep the table too: a company stays a company, a contact a contact.
  • Drag a value onto another record's value in the same column to copy it there. A lookup can only be dragged within its own column, because two lookup columns may point at different tables.
  • Lookups cannot be typed over (double-click does nothing). To empty one, select it and press Delete.
  • A lookup the system requires, such as Owner, can be copied or swapped but never emptied.
  • A lookup that nobody may change shows its value but cannot be chosen.

On the Duplicate Sets page, when its columns come from the view (useDefaultFields is false), the same applies. A column the view takes from a related table (for example the company's phone) is shown, but cannot be chosen.

Lookups in the widget's queryParameters. A filter on a lookup uses its _<name>_value form and FilterType Lookup. For example, to show only duplicates that point at the same company as the record on the form:

{"Filter4": "_parentcustomerid_value", "FilterType4": "Lookup", "FilterValue4": "##_parentcustomerid_value"}

## takes the value from the record on the form. Number the filter after the ones already there.

Where settings come from: Other Settings and the widget's settings​

AutoMerge's duplicate screens read their settings from two places:

  1. Other Settings: one JSON for the whole organization. It is the Field List of the AutoMerge Settings record whose List Type is "Other Settings". It has a few settings at the top, and a section per table (contact, account, lead) with that table's settings.
  2. The widget's settings: a JSON on each form that has the Potential Duplicates widget (the web resource gnb_/Widgets/PotentialDuplicate.htm), in the widget's Custom Parameter (data) in the form designer. It applies to that form only.

Which screen reads which​

  • The Duplicate Sets page (opened with the button on a table's view) reads Other Settings only: the top settings and that table's section.
  • The Potential Duplicates widget on a form reads the table's section of Other Settings, then its own settings on top: a setting on the form wins on that form. A setting the form leaves out comes from the table's section. A setting in neither place uses AutoMerge's built-in default.

For example: Other Settings has "rowSize": "md" in the contact section, and one Contact form's widget has "rowSize": "lg". The Duplicate Sets page and every other Contact form use md; that one form uses lg.

So a setting shared by every form, such as the alternate keys or the button names, is best set once in the table's section of Other Settings. Set it on a form only where that form should differ.

Settings and where they apply​

Setting (default)Duplicate Sets pageWidgetWhat it does
fieldListwhen useDefaultFields is trueyesThe columns: [label, field], third value Lookup or a date format. The widget uses its own if it has one, else the table's.
rowSize ("md")yesyessm, md or lg: row height 28, 34 or 40 pixels.
allowAddressBlockSplit (false)yesyestrue lets one field of an address block be chosen from another record.
alternateKeys ("")yesyesThe table's alternate key fields, comma-separated; emptied on the losing records before a merge, put back if it fails.
autoMergeButtonText, setPrimaryButtonName, ignoreButtonName ("")yesyesBlank: the icon only. Text: the icon followed by the text.
confirmBeforeMergingSingleSet (false)yesyestrue asks before merging one set.
dragAndDropOntoValue ("ask")yesyesask, replace or swap: what dropping a value onto another value does.
useDefaultFields (false)yesnofalse: the page's columns are those of the view it was opened from; true: the table's fieldList.
expandByDefault (true)yesnoWhether sets open expanded (the widget's one set is always open).
dspSetCount (10), dspRowsPerSet (4)yesnoSets per page, and typical rows per set (for the first query).
dspMinimumPrecisionSet (0)yesnoThe lowest precision set users can show (and so merge) on the page; they cannot go below it.
confirmBeforeMergingMultipleSets (true)yesnoAsk before AutoMerge selected merges two or more sets.
targetEntityLogicalNamenoyesThe form's table (default: the form's own table).
queryParametersnoyesWhich set the widget shows: the record's tag (##gnb_automergetag takes it from the record on the form), plus any filter, such as a set precision of 80 or more. The set that shows is always shown whole.
notificationText, notificationLevel ("WARNING")noyesThe notification at the top of the form while the record has duplicates ({0} is how many); INFO, WARNING or ERROR. No text, no notification.
showCurrentRecord (true)noyesfalse leaves the record on the form out of the list, unless it is the winner. It is merged with its set either way.
isClickable (false)noyestrue shows the Open button on the other records (the page always shows it).
openRecordNewWindow (false)noyestrue opens records in a new window; false in place of the form (the page always opens a new window).
orderFieldsnoyesThe order of the rows under the winner, each [field, "asc" or "desc"]. Merging still goes by rank.

The two settings at the top of Other Settings, outside the table sections, belong to the AutoMerge button on the views: ribbonProgressBar (true shows a progress bar while a merge from the view runs) and ribbonAsync (keep false).

Good to know​

  • Any key ending in -comment is a note for people and is ignored, in both places. The JSON files AutoMerge supplies put one above each setting.
  • The AutoMerge Settings form checks the Other Settings JSON as it is typed: a syntax error stops the save and says where; an unknown setting name or a wrong kind of value gives a warning. The widget's settings on a form are not checked this way, so a misspelled name there is simply ignored: check the spelling.
  • Address blocks and the field lists of the merge itself are separate AutoMerge Settings records (their own List Types); both screens read them as they are.
  • Without an Other Settings record, or without a section for a table, the built-in defaults apply. The Duplicate Sets page says so in a note at the top; the widget does not.
  • The Duplicate Sets page reads Other Settings once per browser session; after changing them, use the page's Refresh button (or open a new browser session) to see the change. The widget reads them each time a form opens.
  • Settings written for the original widget (before the widget became one set of the Duplicate Sets page) keep working. A "Rank" column in its fieldList is skipped: the rank now shows in each row.