You need to sign in to do that
Don't have an account?
Jerrod Knapp 25
Created after delete trigger now i can't delete records
I've created a simple trigger on contact to check a box after delete. When I activate the trigger I can no longer delete a contact. Error: "There's a problem saving this record. You might not have permission to edit it, or it might have been deleted or archived. Contact your administrator for help."
Trigger:
trigger trgDeletedContact on Contact (after delete) {
for (Contact c: trigger.old){
c.IsDeleted__c = TRUE;
}
}
Thanks in advance!
Trigger:
trigger trgDeletedContact on Contact (after delete) {
for (Contact c: trigger.old){
c.IsDeleted__c = TRUE;
}
}
Thanks in advance!
You cannot update the record once it is deleted. You can go with before delete event [ subject to your requirement ]
Nor you will not be able to see the record unless you undelete it
Thank You,
Rajesh Adiga P.
you need to use before delete
Kindly MARK AS A BEST ANSWER!!if the reply was helpful.
Regards
Mukesh