Wednesday, March 4, 2015 Eliminate Duplicate on Manual Data Creation

Sometimes it isn't easy to create duplicate detection rules on standard or required fields (last name for instance).  However, this can be done via workflow, to update another custom field and provide the warning of the duplication.  Here's how (using the contact object as an example):

The first step is to identify a field or set of field to determine the uniqueness of the record. Each business can define this uniqueness rule differently.

Let us consider “Last Name” as a field to be unique to a contact.
This standard salesforce field “Last Name” is mandatory.

Let us create a custom field of data type – Text with option – “Unique”

Let us create a workflow rule(WFR) for the duplicate check.
Go to Setup -> Create -> Workflow & Approvals -> Workflow Rules
Click on “New Rule”.
Select the object on which WFR needs to be added. In this case – “Contact”
Now set the rule as explained below,

Now let us specify Workflow Actions,
Under Immediate Action – select “New Field Update”,
Now save. Activate the WFR.
Now we are all set with WFR. Let us see how it works now.  I have an existing contact with the last name of Prabha.

Let us try adding another contact with Last name PRABHA.
It applies the WFR and stops user from entering duplicate contact names.  Here, the unique custom field we added in the beginning is made invisible, as I did not want on the page layout. Hence the error message mentions Hidden Field Value. However there are ways to customize error messages and make it more intuitive like “Contact already exists. Please re-check”.

Also, more than one field can be used to build the WFR to validate the uniqueness, using a concatenate formula to validate against (firstname&lastname for example).

Written by Prabha Krishnamurthy

1 comment:

Anonymous said...

Recognized tag heuer replica uk by way of Polish watchmaker termed Antoni Patek with 1852, he / she seemed to be before long registered with Swiss by means of cartier replica uk, some sort of The french language watchmaker. Little by little, this joint venture manufactured this model essentially the most obtained people everywhere. This tag heuer replica uk wristwatches will not be far too jean pocket welcoming, as a substitute generally is a important investment decision. However, the value assortment seriously isn't in a way that it'd make a ditch with your jean pocket often. Although, precisely what is the sort of motive which enables people opine with the reason get hold of a omega replica uk check out? Most of these wristwatches usually are eternal. Many people never ever go out of vogue in addition to past an entire life. In addition to the reason invest in a rolex replica uk check out? Because doing so is usually endless and it also adds to ones directory belongings in addition to older.