• Angelina Shin
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I'd like to know the different between 
Inserting New Records Using Id as the External ID

and 
 
Create record
I can use Create record without an external ID.  In what case would I use this endpoint?  Thank you! 
 
Hi all, 

I've been attempting to implement the mentioed endpoint (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm) .   According to the docs, this usage for this endpoint is for creating records when an external ID is not provided/available.   Therefore, the ID field becomes the external ID field.   When I create a simple post request to
https://yourInstance.salesforce.com/services/data/v37.0/sobjects/Account/Id
with the following request body (I used the docs example) 
{
    "Name" : "California Wheat Corporation",
    "Type" : "New Customer"
}
I receive the below error (where ACC_EXT__c is the external ID): 
[
    {
        "message": "Required fields are missing: [ACC_EXT__c]",
        "errorCode": "REQUIRED_FIELD_MISSING",
        "fields": [
            "ACC_EXT__c"
        ]
    }
]
I was under the assumption that the point of this endpoint was that it was meant to be called when there is no external.  Would you know why this is requiring an external ID?   Is there a problem with the API? 

Thanks in advance for your help! 


 
I'd like to know the different between 
Inserting New Records Using Id as the External ID

and 
 
Create record
I can use Create record without an external ID.  In what case would I use this endpoint?  Thank you! 
 
Hi all, 

I've been attempting to implement the mentioed endpoint (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm) .   According to the docs, this usage for this endpoint is for creating records when an external ID is not provided/available.   Therefore, the ID field becomes the external ID field.   When I create a simple post request to
https://yourInstance.salesforce.com/services/data/v37.0/sobjects/Account/Id
with the following request body (I used the docs example) 
{
    "Name" : "California Wheat Corporation",
    "Type" : "New Customer"
}
I receive the below error (where ACC_EXT__c is the external ID): 
[
    {
        "message": "Required fields are missing: [ACC_EXT__c]",
        "errorCode": "REQUIRED_FIELD_MISSING",
        "fields": [
            "ACC_EXT__c"
        ]
    }
]
I was under the assumption that the point of this endpoint was that it was meant to be called when there is no external.  Would you know why this is requiring an external ID?   Is there a problem with the API? 

Thanks in advance for your help!