You need to sign in to do that
Don't have an account?
srikanthpalla
delete trigger senario
HI, any one can help to write trigger
I have amount field on custom object.i want write trigger for senario when i want to delete the all records where amount>10000 and also list the IDs of all deleted records
I have amount field on custom object.i want write trigger for senario when i want to delete the all records where amount>10000 and also list the IDs of all deleted records
First of all you should use script to delete all the records in which amount > 10000. If you want to use trigger, use this :
Regards,
Ajay
All Answers
First of all you should use script to delete all the records in which amount > 10000. If you want to use trigger, use this :
Regards,
Ajay
In your case if you want to delete all records where the amount is >10000 then my suggestion is to write a batch class and execute the class from executing anonymous window or run using the scheduled apex class.
Through batch class, you can able to handle more number of records
To know more about batch class check this link.https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm