You need to sign in to do that
Don't have an account?
Shreya Jain
I have a custom object Staging__c with fields Firstname__c, Lastname__c, PostalCode__c . Now, I have to check or search for existing contacts with matching FirstName,Lastname,PostalCode.
I have a custom object Staging__c with fields Firstname__c, Lastname__c, PostalCode__c . Now, I have to check or search for existing contacts with matching FirstName,Lastname,PostalCode. If contact not found , then we have to create a contact. This have to be done in Batch Class.
You can follow the steps mentioned below to achieve your requiremnet:
1. Create a set of String that will hold the Contact First Name + Last Name + Postal Code. For Eg: 2. In the start method of your batch class, you have to query all the Staging records.
3. In the exectute method, you need to if the setOfContactInformation contains the information from the staging record then skip it else create a contact record. For Eg:
Please let me know if you need any further help or information on this.
Thanks,
Abhishek Bansal.
Hi Shreya,
Please close this question if the solution worked for you.
Thanks,
Abhishek Bansal.