You need to sign in to do that
Don't have an account?
Venkat Reddy 45
Query record and delete record
Dear Experts,
I want to "Query record and delete record ", could you please give me code for this?
Regards,
Venkat.
I want to "Query record and delete record ", could you please give me code for this?
Regards,
Venkat.
Of course you'd want to do more with this like verifying that Id is valid, and that it exists. And if you're doing this in a trigger you'll want to make this bulk ready.
If you are doing it via REST or SOAP or something like the Dataloader it's different.
All Answers
Of course you'd want to do more with this like verifying that Id is valid, and that it exists. And if you're doing this in a trigger you'll want to make this bulk ready.
If you are doing it via REST or SOAP or something like the Dataloader it's different.
For(Object obj : [Select id from Object where id='xxxxxxx']){
o.add(obj);
}
delete o;