Skip to main content
Undelete
Updated over 3 months ago

Create a load table

This example creates a load table called "Account_TestLoad_Undelete". The Id and Error columns are mandatory. All load operations require the Error column, whether success or failure, to guide and inform you. Undelete requires a populated Id column.

drop table if exists Account_TestLoad_Undelete
select
Id
,convert(nvarchar(255),null) as Error
into Account_TestLoad_Undelete
from Account_TestLoad_Delete
where Error = 'Success'

In this example, the Undelete payload has been generated from the prior Delete payload example, taking only those which were successfully deleted. As usual, additional fields can be included in the payload, if required or necessary for your particular use case. The Delete operation will ignore (but preserve) them as it is only concerned with the Id and Error fields

Running the example

exec ss_Loader 'Undelete','DEMO','Account_TestLoad_Undelete'

SQL-SALES Undelete run date: 2023-11-04 -------------------------

19:34:28: Using Env|Schema: DEMO|dbo

19:34:28: Starting Loader for Account batchsize 200

19:34:28: SSId added to Account_TestLoad_Undelete

19:34:31: Connection method BULK & SOAP API

19:34:31: Columns checked against Salesforce metadata

19:35:06: Load complete: Success:1791 Failure:0

-----------------------------------------------------------------

Did this answer your question?