Restores previously deleted Salesforce records.
// Connect to Salesforce
Cnt is sfConnection
Cnt.Login = "email@example.com"
Cnt.Password = "qwerty" + "XXB12VCZ54"
IF SFConnect(Cnt) = False THEN
Error("The connection failed")
ResGetDel is sfSeekDeletedResult
ResGetDel = SFSeekDeleted(Cnt, "Mileage__c", "20090101", "20090131")
arrRestore is array of strings
MyRecord is sfDeletedRecord
FOR EACH MyRecord OF ResGetDel.DeletedRecord
ResRestore is array of sfUndeleteResult
ResRestore = SFUndelete(Cnt, arrRestore)
MyRestoredRec is sfUndeleteResult
FOR EACH MyRestoredRec OF ResRestore
Trace("ID = " + MyRestoredRec.ID)
Trace("Success = " + MyRestoredRec.Success)
<Result> = SFUndelete(<Salesforce connection> , <Records to restore>)
<Result>: Array of sfUndeleteResult
Array of sfUndeleteResult variables that contains the restored records.
<Salesforce connection>: sfConnection variable
Name of sfConnection variable to use.
<Records to restore>: Array of strings
Name of the array of character strings containing the Salesforce identifiers of the records to restore.
Possible error cases:
- The Internet connection is not valid.
- The authentication was not performed properly.
- The XML response of the server cannot be read.
To find out whether an error occurred, use the ErrorOccurred