+ Start a Discussion
Swathi CseSwathi Cse 

Duplicate records

when we insert the records it has to update when duplicate values are there..
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.

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
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 .