+ Start a Discussion
subbu.flex9@gmail.comsubbu.flex9@gmail.com 

Delete through trigger

can delete records in trigger by using delete statements ?

 

if possible what are the possible trigger events ?

 

if not possible , what is the reason behind that ?   ple tell me this is one of the interview question to me .   

 

 

thank u

testrest97testrest97

We cannot delete beacuse we are still updating the records, the context is not yet completed. We can however delete by creating a new instance of the record using new key word.

 

Eg: case c=new case(id=c.id);