8

Undelete | Apex DML Standalone Statement

Undelete In Apex

To restore or undelete the record from recycle bin, you need to use undelete statement.

Example

 List < Contact > deletedContacts = [SELECT Name FROM Contact
    WHERE isDeleted = true ALL ROWS
];
undelete deletedContacts;

salesforce-developer
Next Topic

Need more support?

Get a head start with our FREE study notes!

Learn more and get all the answers you need at zero cost. Improve your skills using our detailed notes prepared by industry experts to help you excel.

Book A 15-Minutes Free Career Counselling Today!