Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Deleting Sales Force Records Prior to insert

Hello!  I am relatively new to Talend.  I have successfully created a job that pulls filtered data from our AS400 and inserts into a custom Sales Force object in my Sandbox environment.  Now I need to create a step that deletes all records in the Sales Force custom object before the insert.  I was able to find several posts regarding this topic however none had solutions. So far I have a tSalesforceOutput component with the Output Action = DELETE.  Next is a tLogRow component (so I have a list of the record Ids).  Then a tSalesforceInput component.     I can execute the job without error but no records are deleted in Sales Force.  

 

Any assistance would be greatly appreciated.

 

cjsigler

Labels (4)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Hi,

You must know Salesforce Id for records you want to delete.

So, you need a tSalesforceInput to select these Id, then using tSalesforceOutput (or tSalesforceOutput if lot of records) you can delete the selected records. Just be careful to have Id as the only field in the schema for both components.

Here is the minimal job design for such a case:

tSalesforceInput --> tSalesforceOutput

 

Can you share your job?

 

View solution in original post

15 Replies
TRF
Champion II
Champion II

Hi,

You must know Salesforce Id for records you want to delete.

So, you need a tSalesforceInput to select these Id, then using tSalesforceOutput (or tSalesforceOutput if lot of records) you can delete the selected records. Just be careful to have Id as the only field in the schema for both components.

Here is the minimal job design for such a case:

tSalesforceInput --> tSalesforceOutput

 

Can you share your job?

 

Anonymous
Not applicable
Author

So it sounds like I have my components backwards.  Not sure how to share the job so here is an image.

0683p000009Lv8C.png

 

 

TRF
Champion II
Champion II

Right, can you also share the schema for bot tSalesforceInput and Output components?
Also, does the tSalesforceInput select at least 1 record?
Anonymous
Not applicable
Author

Like this?

0683p000009LuVB.png

Anonymous
Not applicable
Author

That worked!!  I had my components backwards!  Thanks so much!!

Anonymous
Not applicable
Author

0683p000009Lv8R.png

TRF
Champion II
Champion II

That's what I was going to tell you.

For best practice allways design your jobs from left to right and top to down.

jlig
Contributor III
Contributor III

cjsigler, I'm trying to create a Delete job like yours, but not sure what  I'm doing wrong?

  • I created a setup like yours:
  • 0683p000009LsaE.gif
  • When I click run, I get the following error:
  • 0683p000009LslS.gif
  • Am I missing something here? Do I need to use the tMap component too?
jlig
Contributor III
Contributor III

My insert query/job works fine which uploads data from MySQL to my custom Salesforce object (see below):

- But how do I combine/add in the Delete option?

- I need to alter my job below to first do the Delete

- Then complete the Insert job

0683p000009LsWd.gif