Four Stars

Delete some Salesforce Rows

Hey I have a special task.

 

i get files every hour where only the updated opportunities from salesforce arrive. i can easily upsert the opportunities.

However when i try to update the positions of these opportunities i have a real problem. The positions and the amount of positions to import for the opportunity can change.

The workflow should be:

-delete all opportunity positions for the opportunities mapped in the xml file

-add all positions from the xml file back.

 

the xml file contains an external key in the opportunity and a reference to the opportunity in the positions.

What i would like to do is 

"select id from opportunity_lines_c where opportunitylineid__c in (<get the list of all opportunityids in the file>)"

and delete them.

 

but i cant get it to work. can somebody give me a hint? Would be very much appreciated.

 

Regards Simon

 

 

 

 

1 REPLY
Forteen Stars TRF
Forteen Stars

Re: Delete some Salesforce Rows

What kind of error do you encounter?
Do we have to divine it?
What does the "list of all opportunityids in the file" looks like?
Trace it on the console to be sure it is as you expect.

TRF