function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sean DaggerSean Dagger 

custom scontrol to check for duplicate contacts

My JavaScript skills are below par.  I have spent a full day trying to acheive something and cannot do it to save my life.
 
I am trying to do a manage duplicate contacts Scontrol which which allows users to lookup duplicate contacts and select them.  I can successfully link to the lookup popup screen passing in the id's and select the duplicate contact no problem (this is done by clicking the icon to call the popup, search the duplicate and select the appropriate one), Clicking save then updates the contacts duplicate contact field (all success). 

The problem I have got now is trying to replicate the functionality of the standard contact edit screen.

For example:
On the standard Contact edit screen: When you type in a non existant name (ie, asdffda) and click save, it errors saying no matches found.  When you type in something like 'group' (where many exist) and click save, it errors and changes the input type text box to a select box with the possible options to choose from.  How the look up on save works is totally beyond me.
 
On my manage duplicate contacts custom screen, it all works apart from checking the lookups when you click save.  When I click save, I basically want it to look up the name and return the same errors as the standard edit functionality does. Could anyone point me in right direction?  As my JavaScript/SalesForce programming skills are not very good, code examples would be fantastic!!!
 
Thank you for all your help.

Message Edited by Sean Dagger on 09-20-2007 07:05 AM

ReidCarlbergReidCarlberg
Hi Sean,

Ran into a good example of duplicate checking in the cookbook.  You can download it here:

http://www.apexdevnet.com/events/cookbook/pdf/salesforce_platform_cookbook.pdf

Look on page 118, "Preventing Duplicate Records From Saving".

Cheers,

Reid

LTELTE

Hello Reid,

I am new to Salesforce and have been working with my developer account, however, we are using an enterprise version for our production environment.

My understanding is that Enterprise does not support apex code...that we would have to duplicate this functionality without using triggers...which I suppose means s-controls and API...

Is that correct?  If so, can checking for duplicates be accomplished with the Enterprise tools?

LTE

sumpritsumprit
Hi there,

Have you considered downloading the custom application that is available in AppExchange. I tried one of this called Record DeDup and it works pretty good. There is also one more tool called - Deman tool which does the job great.

thanks
sumiya