Understanding the Dedupe screens created by the Advanced Customization Wizard

Hints, Tips and Tricks

Technical Hints Tips and Tricks that cover customization and development using Sage CRM. API usage and coding are covered.

Understanding the Dedupe screens created by the Advanced Customization Wizard

  • Comments 4
  • Likes

A customer had a requirement to understand the way in which the Dedupe screens for a Custom Entity worked.

The customer had created a new entity that was the child of Companies and Persons and they had added the look up fields into the Dedupe screen for the custom entity as you can see in the screen below.

They found that the deduplication partially worked as conflicts with existing data would be shown (as below)

But if they then continued to enter the new entity, they found that not all the information they had entered into the orginal screen was carried across into the full entry page as you can see in the image below.


I hope that the rest of the article will explain why the Wizard created pages work like they do and what you would need to change to get them to work in the way you want them to work.

 The insertion of a record for a new Custom Entity with deduplication 'enabled' uses 3 separate ASP pages, assuming the entity is called 'myEntity' these pages are:

  1.  myEntity/myEntityDedupe.asp
  2.  myEntity/myEntityConflict.asp
  3.  myEntity/myEntityNew.asp

The fields that you add to the myEntityBoxDedupe will be displayed in the first screen (myEntityDedupe.asp).

The values that you have entered for your entity is be read in the conflict screen (myEntityConflict.asp) using the Request.Form() collection e.g. Request.Form("xxxx_companyid").

Note:  By default the generated code for the ASP pages does not expect to have any more fields added to it.  It just assumes that the default of the xxxx_name field is used.

 You can see this in the code of the myEntityConflict page look for 

[code language="javascript"]
sPOST = sPOST + "&fieldname" + "=" + sField;
sPOST = sPOST + "&fieldval" + "=" + sValForm;

"sPost" is a variable that is then added to the URL when the page is redirected to the myEntityNew.asp page, look for the code that looks like this (my new entity was called Project)

[code language="javascript"]
Response.Redirect(CRM.URL("Project/ProjectNew.asp") + sPOST + "&E=Project&context="+context);

The code of the new Page (myEntityNew.asp ) will then look for the two name value pairs (fieldname & fieldval) in the Request.QueryString


[code language="javascript"]
names = Request.QueryString("fieldname");
if( Defined(names) )
vals = Request.QueryString("fieldval");
//get values from dedupe box
for( i = 1; i <= names.Count; i++)
Entry = EntryGroup.GetEntry(names(i));
if( Entry != null )
Entry.DefaultValue = vals(i);

If you want to include other values in the Dedupe screens then you will need to the alter the code of 2 of the 3 pages involved 

  •  myEntity/myEntityConflict.asp
  • myEntity/myEntityNew.asp

 I hope this will help you customize the dedupe behaviour for custom entities.

  • Looks good. Is the 7.2 wizard available anywhere as it doesn't appear to be on the site?

  • It is on the website now in the Partner area.

  • Hi Jeff,

    Is there any details available for version 7.3 and dedupe behaviour for custom entities?

    I am having issues and the conflict asp page generated has changed from what you have here so I am finding it hard to troubleshoot where the problem lies.

    Thanks Jeff.

    Kind regards,

    Penny Vaskess

  • Penny

    I am sorry, I haven't investigated this.