+ Start a Discussion

Based on query


How to check the new record values with all old records in same object using query in before insert operation.

SonamSonam (Salesforce Developers) 
1)You need to write an SOQL to first retrive all the existing records and put them in a list
2)Using a for loop, iterrate in the list comparing each element(record) with the one you are trying to enter.