developerforce / Force.com-JavaScript-REST-Toolkit

ForceTK - a minimal Force.com REST API for JavaScript apps
BSD 3-Clause "New" or "Revised" License
315 stars 175 forks source link

How to perform bulk DML operations in salesforce hybrid app ? #63

Closed ramsabarish closed 9 years ago

ramsabarish commented 9 years ago

I have created a salesforce hybrid app using Forceios and I'm able to perform the CRUD operations using forcetk client instance .

Now I want to perform mass update on salesforce objects but I didn't find any running example code to do so.

For 2 days I have searched for topics like BULK API, SmartSync , JSForce but I don't understand how to implement them.

Kindly share a code to perform Bulk DML operations like mass update , mass delete through salesforce hybrid app.

Kindly Help me out ....

metadaddy commented 9 years ago

I wrote a Bulk API plugin for ForceTK. Check it out: https://developer.salesforce.com/blogs/developer-relations/2015/03/bulktk-calling-force-com-bulk-api-visualforce-pages.html

Let me know how it works for you and I'll close the issue.

ramsabarish commented 9 years ago

How to include Bulk API plugin in hybrid app or how to download bulktk.js. I'm not using visualforce pages in my mobile app.

Kindly help me.

metadaddy commented 9 years ago

It's just like using ForceTK. Are you using the Salesforce Mobile SDK for your hybrid app, or PhoneGap?

ramsabarish commented 9 years ago

Well I'm using Salesforce Mobile SDK in hybrid app.

metadaddy commented 9 years ago

The technique I outlined in that blog post will work with Mobile SDK just as well. You would need to add bulktk.js to the project (drop it in the same directory as forcetk.js), then you should be able to use the BulkTK calls with the same client object. Right now I don't have the correct Mac OS on my laptop to run the latest Mobile SDK, but if you give me a little while I should be able to create a demo app.

metadaddy commented 9 years ago

Assuming you got this working and I can close the issue. Feel free to reopen it if you're still having problems.