You need to sign in to do that
Don't have an account?
Ankita Kumari 68
Cancel delete trigger and restore deleted records
I would like to create a Trigger to set EndDate of record when user clicks Delete button and cancel the delete request.
Which means when user clicks delete button on contact object, trigger should not delete the record rather just set EndaDate.
I have tried beforeDelete and afterDelete triggers but I'm not able to pass values for undeleting the record from trigger logic
Can anyone give me right direction to do so?
Thanks in advance!
Which means when user clicks delete button on contact object, trigger should not delete the record rather just set EndaDate.
I have tried beforeDelete and afterDelete triggers but I'm not able to pass values for undeleting the record from trigger logic
Can anyone give me right direction to do so?
Thanks in advance!
Check with below link where you have sample code for the same.
http://www.force2b.net/index.php/2009/03/logging-deleted-records-in-salesforcecom/
https://developer.salesforce.com/forums/?id=9060G0000005ehGQAQ
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya