ISTEST
MockUndeleteHandler is used to mock the Database.UndeleteResult class and the Database.undelete method
Since
3/9/2024
Group DML Engine
Author Zackary Frazier
Inheritance
doUndelete is used to undelete a record from the database
public Database.UndeleteResult doUndelete(sObject recordToUndelete, Boolean allOrNone)
Name | Type | Description |
---|---|---|
recordToUndelete | sObject | - The record to undelete |
allOrNone | Boolean | - Whether to throw an exception if the record does not exist |
Database.UndeleteResult
Database.UndeleteResult - The result of the undelete operation
DmlException: - If the record does not exists and allOrNone is true
doUndelete is used to undelete a list of records from the database
public List<Database.UndeleteResult> doUndelete(List<sObject> recordsToUndelete, Boolean allOrNone)
Name | Type | Description |
---|---|---|
recordsToUndelete | List<sObject> | - The records to undelete |
allOrNone | Boolean | - Whether to throw an exception if any of the records do not exist |
List<Database.UndeleteResult>
List<Database.UndeleteResult> - The results of the undelete operations
DmlException: - If any of the records do not exists and allOrNone is true
doUndelete is used to undelete a record from the database
public Database.UndeleteResult doUndelete(Id recordID, Boolean allOrNone)
Name | Type | Description |
---|---|---|
recordID | Id | - The Id of the record to undelete |
allOrNone | Boolean | - Whether to throw an exception if the record does not exist |
Database.UndeleteResult
Database.UndeleteResult - The result of the undelete operation
doUndelete is used to undelete a list of records from the database
public List<Database.UndeleteResult> doUndelete(List<Id> recordIDs, Boolean allOrNone)
Name | Type | Description |
---|---|---|
recordIDs | List<Id> | - The Ids of the records to undelete |
allOrNone | Boolean | - Whether to throw an exception if any of the records do not exist |
List<Database.UndeleteResult>
List<Database.UndeleteResult> - The results of the undelete operations
DmlException: - If any of the records do not exists and allOrNone is true
doUndelete is used to undelete a record from the database
public Database.UndeleteResult doUndelete(SObject recordToUndelete, Boolean allOrNone, System.AccessLevel accessLevel)
Name | Type | Description |
---|---|---|
recordToUndelete | SObject | - The record to undelete |
allOrNone | Boolean | - Whether to throw an exception if the record does not exist |
accessLevel | System.AccessLevel | - The access level of the user performing the operation |
Database.UndeleteResult
Database.UndeleteResult - The result of the undelete operation
Inherited
Returns true if the method was called, otherwise false.
public Boolean wasCalled()
Boolean
,[object Object]