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
Swathi CseSwathi Cse 

Duplicate records

when we insert the records it has to update when duplicate values are there..
logontokartiklogontokartik
I am not sure if I understand what you mean by duplicate records. Please be clear on the issue you are having, If you want someone to write code for you, this is not the right place, you can do that by hiring a consultant.
Abhishek BansalAbhishek Bansal
Hi Swathi,

Please use Upsert instead of insert in your code.
It will automatcally detects whether a record needs to be inserted or updated.

Let me know if you need more information.

Thanks,
Abhishek
Swathi CseSwathi Cse
i have three fields oreder number,orderrelease number and product no...
i have to compare these three values while inserting the records so that no duplicates
ManojjenaManojjena
Hi Swathi,
Create a formula field with combination of above three fields create one more field which will be unique and required and write before insert  trigger   to assign  that unique field with your formula field value .Make sure that all above three field should mandate .It will prevent to create duplicate record .

Let me know if this works .
Thanks
Manoj