You need to sign in to do that
Don't have an account?
Murthy vvr
How to access SObject records without writing SOQL in apex Triggers.
Hi, Is there any way to access existing records of SObject in isInsert block of a trigger. ???
Trigger Trg_name on Sobj_Name(before insert) {
if(Trigger.isInsert) {
//Here i need to access the existing records of Sobject without writing SOQL.
}
}
Thanks for the reply, Records being inserted can be accessed using Trigger.new, but I need to access all records of certain type without writing SOQL.
There are too many checks in place to simply say that you would like to check against all records of one type, from the 200,000 script line limit, to the 50,000 query row limit, to the 12MB (or whatever it is these days) heap limit. Your job as a developer is to work within these constraints to use system resources effectively to complete the task.