function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ted Z.Ted Z. 

Looking for a simple sample phonegap app. that uses SOAP to

add a record to a custom object.

I have looked around and could not find such a sample app.  
Best Answer chosen by Ted Z.
Vinita_SFDCVinita_SFDC
You can use REST API also for the same but not for inserting large amount of data.

All Answers

Vinita_SFDCVinita_SFDC
Hello,

There is no such app as of now. Can you please elaborate about what are you expecting out of this app, so that i would be able to suggest you better.
Ted Z.Ted Z.
Assume I have a custom object, I need to create/update records to this custome object. My app. is a hybrid app. that uses javascript/html to
access salesforce.com.
As I understand, we need to use SOAP API to write to a custom object.  A simple sample app. that uses SOAP API
to manipulate a simple custom object would be very helpful.

Thanks,

ted
Vinita_SFDCVinita_SFDC
Hello Ted,

Yes you can use SOAP API for this purpose. I would suggest you to refer salesforce SOAP API guide, it has explained with code sample:

http://www.salesforce.com/us/developer/docs/api/index.htm

Also have a look at: https://developer.salesforce.com/forums?id=906F00000009CYtIAM

Hope it hepls!
Ted Z.Ted Z.
Right now, we use REST API to login,  do we need to login with SOAP to get the session ID to use SOAP API?

Is the access token the same?

Thanks for the pointers.

ted

Vinita_SFDCVinita_SFDC
Hi,

You just need to provide username and password in login.txt.

Refer: http://www.salesforce.com/us/developer/docs/api_asynch/Content/asynch_api_quickstart_login.htm
Ted Z.Ted Z.
Hi Vinita,

That seems to be a problem to use both REST and SOAP. When we use REST API to login, the app. doesn't have access the password.
But this SOAP approach requires the password. That means we will ask users to enter their pasword again.

Is it still impossible to use REST API to manipulate a custom object?
Vinita_SFDCVinita_SFDC
You can use REST API also for the same but not for inserting large amount of data.
This was selected as the best answer
Ted Z.Ted Z.
So to insert one record at a time to a custom object, we can use REST API?
That would be great if possible. Somehow I read a couple of days ago that only SOAP API can manipuate a custom object.
Vinita_SFDCVinita_SFDC
Yes, it is possible. Refer section Working with records->create a record in following guide



Refer: http://www.salesforce.com/us/developer/docs/api_rest/
Ted Z.Ted Z.
 I have done that with standard objects. We will check out with custom objects. 

Thanks.
Ted Z.Ted Z.
Vinita,

Thanks. REST API does work with custom objects.