Potential Duplicates and Editable Field-Chooser Subgrid (Web Resource)

A couple months back we announced a new web resource to show end-users the potential duplicates in a subgrid right on the form. That earler version depicts a read-only list of records that allows you to perform all the usual AutoMerge functions (Make-Winner, Ignore and AutoMerge).

The main advantage of seeing potential duplicates in the form is that your end-users (the actual owners of the records) can be prompted to AutoMerge them as they discover them as opposed to having an IT/Analyst type person deal with them en masse from the list view (which is not politically feasible in many organizations)

Here’s a screenshot of the read-only version of the web resource:

Potential Duplicates Subgrid Focus
Potential Duplicates Subgrid Focus

Since then we have added new version of the web-resource that gives your end users a field-chooser/editor as well.

This is the new version:

Potential Duplicates with Editable Field Chooser focus screenshot
Potential Duplicates with Editable Field Chooser

Same as the earlier version in that you see the record you are currently viewing in BOLD. You see the yellow notification at the top and you have the MakeWinner, Ignore and AutoMerge buttons. You can still customize which columns/fields to show by editing a JSON described later.

We have added the following:

    • On the far left of the grid before the MakeWinner button is an arrow icon Jump To Record Icon  With this the user can quickly jump to another record in the duplicate set.
    • Each column/field shows the values as select-able buttons from each duplicate record and the first (in Rank order) record with a non-NULL value in each field is already selected for you as a default.
    • The user can select non-default values for any field they would like to be placed on the winner (Rank=1 record) when the AutoMerge button is clicked. Note: If the user browses away before they click the AutoMerge button any changes to the default selections are lost.
    • Any field is editable from this grid by double-clicking and making the change. Edits made this way are applied immediately when you leave the field. Editing a specific field doesn’t mean you have to select that field to win the AutoMerge operation.

 

The above screenshot shows how we customized the OOB Contact form on our demo org.

You can do the same. The custom form we include in the AutoMerge Managed Solution (form name “AutoMerge”) has the Potential Duplicates subgrid (web resource) configured on it so if you have either Administrator or Customizer roles, you should be able to see it and copy it to the form your end-users are looking at.

The web resource has two visible components: the grid showing the records of the duplicate set, and the notification in the upper left.  Both of these are customizable to your particular needs by editing the Custom Parameters(data) when you add the web resource component to a CRM form. The JSON string we put in that field instructs the web resource how to render itself.

In the screenshot above the Custom Parameters(data) field is where the JSON string is defined. As mentioned, you can copy the string from the web resource on the form named “AutoMerge”. 

Here is default JSON string for Contacts: 

{
"Comment" : "Go to https://automerge.com/userguide#potentialduplicates for instructions",
	"fieldList": [

		[
			"Rank",
			"gnb_automergerank"
		],
		[
			"Match Type",
			"gnb_automergematchtype"
		],
		[
			"Precision %",
			"gnb_automergematchprecisionsingle"
		],
		[
			"First Name",
			"firstname"
		],
		[
			"Last Name",
			"lastname"
		],
		[
			"Email",
			"emailaddress1"
		],
		[
			"Mobile Phone",
			"mobilephone"
		],
		[
			"Business Phone",
			"telephone1"
		],
		[
			"Home Phone",
			"telephone2"
		],
		[
			"Street 1",
			"address1_line1"
		],
		[
			"City",
			"address1_city"
		],
		[
			"ZIP/PostalCode",
			"address1_postalcode"
		]
	],
	"alternateKeys": "",
	"rowSize": "md",
	"showCurrentRecord": true,
	"isClickable": true,
	"openRecordNewWindow": false,
	"autoMergeButtonText":"AutoMerge",
	"ignoreButtonName": "Ignore",
	"setPrimaryButtonName": "MakeWinner",
	"targetEntityLogicalName": "contact",
	"orderFields": [
		["gnb_automergerank","asc"],
		["gnb_automergematchprecisionsingle", "desc"]
	],
	"notificationText": "AutoMerge analysis found {0} potential duplicate(s) of this Contact, see section below.",
	"queryParameters": [
		{
			"Filter1": "gnb_automergetag",
			"FilterType1": "String",
			"FilterValue1": "##gnb_automergetag"
		},
		{
			"Filter2": "statecode",
			"FilterType2": "OptionSet",
			"FilterValue2": "0"
		}
	]
}

Let’s dig into the some of the elements in the JSON string:

  • fieldList: you define your columns here.
    • the first string is the column title
    • and the second is the schemaname of the field
  • alternateKeys: a comma separated list of schemanames of those columns in the fieldList that represent part (or all) of an Alternate Key defined for this entity. This configuration option ensures keys are preserved from the loser to the winner in such a way as to not trigger the CRM platform’s duplicate key error.
  • rowSize: this must be one of “sm”, “md” or “lg”
  • showCurrentRecord: if true then the record in main part the form is also shown in the grid in bold
  • autoMergeButtonText: if set to an empty string “” the button will not appear
  • ignoreButtonName: (same) if set to “” the button will not appear
  • setPrimaryButtonName: (same) if set to “” the button will not appear
  • orderFields: list of up to 10 sort field pairs: schemaname & sort-direction (“asc” or “desc”)
  • queryParameters: you can define up to 10 filters.
    Each has three parts (increment the “N” each time)
    • FilterN: schemaname
    • FilterTypeN: one of “String” / “OptionSet” / “Lookup
    • FilterValueN: is either
      • a static value like “0
      • or a variable like “##gnb_automergetag”  (## means get the value from the current record)
        …in other words, show all records whose gnb_automergetag field EQUALS  the gnb_automergetag field of the current record

Grab our latest AutoMerge Managed Solution from our Resources Page.

Happy AutoMerging!

Copyright © 2020 AutoMerge