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
tdeletdele 

Record DeDup 1.4 (SearchFirstCreate)

Hello,
I am currently using this app (searchfirstcreate) created by the Salesforce labs in production.  I'm in the final stages of testing B2C - Person Accounts in my sandbox, and this s-control does not function properly.  Has anyone used this successfully with Person Accounts? 
 
The long and short of it...I search for the last name 'Test' and it finds the 'Test' records for Contacts, Leads, Users, etc...but it does not find the 'Test' Person Accounts that I see in my Accounts table.  Am I missing something?  What modifications are necessary to make this work properly with regards to Person Accounts?
 
Any help is greatly appreciated.  Thanks!  :smileyhappy:
Ron HessRon Hess
This should be a minor change, but i'm not sure exactly what to change, let me ask around. may take a few days but we should be able to get some help on this.  thanks for reporting this.
Ron HessRon Hess
I found a simple fix, it may work for you as well

in the scontrol locate the init call:

sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_60}");

change this to
sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_90}");


so that the app will use a recent API version.


the person object was introduced into the API after 6.0, this app should be re-written to use the new AJAX toolkit, but i'll have to leave that for another day  
tdeletdele

Hi Ron,

That did the trick...:smileyvery-happy:  Thanks so much, I appreciate your help.

Tara

KenSKenS
Hi,

Would it be difficult to enhance this to record the record type being created?

Example - Account default record type is A

User clicks new
User selects record type (say record type B)
User is presented with the search screen (URL appears to contain the record type>
https://emea.salesforce.com/001/e?retURL=%2F001%2Fo&RecordType=01220000000Cr0d&cancelURL=%2F001%2Fo&ent=Account

User searches and wants to create a new account record
User clicks create new account
https://emea.salesforce.com/001/e?retURL=%2F001%2Fo&rt=Account&cancelURL=%2F001%2Fo&nooverride=1&acc2=test

Record type not carried and new account is created with the defualt record type

if I could get the record type to carry through this would be awesome (it's just great now)