cancel
Showing results for 
Search instead for 
Did you mean: 

how to delete data in salesforce table from bods designer

former_member186160
Contributor
0 Kudos

hi all,

i have a requirement to load data from oracle to salesforce table daily.

also before the load, the existing data from salesforce table should first be deleted

i tried to do a test load, which was possible.

but the only issue is that i am not able to figure out on how to truncate the salesforce table from BODS side.

can anyone please suggest ?

Accepted Solutions (1)

Accepted Solutions (1)

former_member186160
Contributor
0 Kudos

hi all,

this was not possible from bods scripts.

so our salesforce team agreed to delete data manually whenever we required.

Answers (3)

Answers (3)

abhi2636
Participant
0 Kudos

Hi Swetha,

We can delete the salesforce table data from using SAP Data services. Please check this document:

Hope this makes your works easier in future .

Regards,

Abhi

Former Member
0 Kudos

I believe using a Map_CDC_Operation transform should suffice for what you are trying to do. You can map your CDC operations accordingly so that you are always loading the latest set of data.

-Chaitanya

former_member186160
Contributor
0 Kudos

hi, any idea of how to delete/truncate the salesforce table data from BODS?

Former Member
0 Kudos

Swetha,

If above didn't work for you, can you call a script from DS using the exec command to truncate a salesforce table. I believe they are apex class codes to delete tables and if you can externally trigger this, you should be good to go. I haven't worked with SF tables so not too sure myself.

-Chaitanya

former_member186897
Contributor
0 Kudos

Swetha N




sql( 'DATASTORE_NAME','TRUNCATE TABLE TABLE_NAME');

Change the datastore name and table name in code above accordingly for your Job.

Put this code inside a script and connect this script to your data loading DF.

Hope this helps.

Regards,

Ansari

former_member186160
Contributor
0 Kudos

hi,

i tried this script from BODS, but i got an error message that this is not supported.

Script:

sql( 'DATASTORE_NAME','TRUNCATE TABLE TABLE_NAME');

error message:

Unsupported database type <Adapter> specified as repository. Valid types are <Oracle, ODBC, MySQL, Sybase, Memory, MaxDB, HANA,

DB2, SQL_Anywhere>. Ensure database type matches in spelling and case to the supported types.

Former Member
0 Kudos

Double click on the target table in BODS designer area and go to options tab and check the "Delete data from table before loading " check box.

Thanks,

AJ.

former_member186160
Contributor
0 Kudos

Arun,

thanks for replying.

we dont get the options' tab if the target table is in salesforce.

let me know if any more suggestions.