2

I am currently testing some Salesforce functionality, we have a suite of forms on our website which when submitted will hopefully create a record in Salesforce. These records will all be created in custom applications/objects.

I have been able to setup and test the REST API in our form environment, I am currently able to handle create/update/delete of contacts/accounts and leads - to do this part of my code has the url ending:

/sobjects/Lead/

Does anyone know what to use for custom objects?

Sorry if this is naive I am a beginner with Salesforce. I have assumed the functionality exists for the REST API however I am prepared to use SOAP if I need to.

1 Answer 1

3

It follows the same rules as all other uses of custom objects:

/sobjects/My_Custom_Object__c/

If the object comes from a "managed package", it will also have a "namespace":

/sobjects/namespace__My_Custom_Object__c/
3
  • I hate it when its so obvious - thanks for clearing it up - having it written so explicitly is such a help sometimes. Next challenge is to learn and understand the lookup fields and how they work with the api.
    – n34_panda
    Commented Jun 30, 2015 at 17:06
  • 2
    @n34_panda You'll want to look at the examples in the REST API, but basically, they're also straight-forward. If account A has id 001300000000bad, you can associate it to contact C by using { "AccountId": "001300000000bad" }. Give it a try, and I think you'll find it's pretty straight-forward.
    – sfdcfox
    Commented Jun 30, 2015 at 17:12
  • Great thanks - I actually just did, found exactly as you suggest I need to pass the id of the record. I actually think that is everything I need to migrate my forms from our current app to salesforce...great news. May even introduce a bit of extra functionality. I appreciate it
    – n34_panda
    Commented Jun 30, 2015 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .