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
Shyamala VaradharajanShyamala Varadharajan 

How to check Duplicates while inserting Record and update existing record if its already exists

Hello,

I have a Custom Object with 3 text fields  and 1 Date Field. If I try to create a new record with same values for all 4 fields then need to throw Duplicate Error else if I have same values in Text Field and  Date is different then need to update the existing record with new Date value. How can I achieve this . Please help
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Shyamala,

Did you try using Matching rule and Duplicate rules to achive this.please find the below article for the same.

https://trailhead.salesforce.com/content/learn/modules/sales_admin_duplicate_management/sales_admin_duplicate_management_unit_2

If this solution helps, Please mark it as best answer.

Thanks,
 
Shyamala VaradharajanShyamala Varadharajan
Hi ,

Is it possible to do with Trigger as I need to do this with Trigger.
earn wealthearn wealth
i am not so professional in this . Guys please help him. ClaimRBX (https://claimrbx2022.site/) ,    hit it rich free coins (https://hititrichfreecoins.online/) , 
  coin master free spins (https://coinmasterfreespinslinktoday.com/)
    free vbucks (https://freevbucks.cyou/)