1

I want to send (a lot more) than 25 new records to the server using the REST API to Salesforce.

For example:

I have a CattleOwner and 50 Cattle objects that are liked by id to the owner object.

Due to this linking and that I have to be sure, that all my records aka battles are successfully created (allornone-flag), I think, I have to use the Composite Request.

Problem

This kind of request is limited to just 25 records per request.

Do anybody knows another approach to be transaction save and send more than 25 records at once to the server? The batch request does not allow to link the objects, etc. pp. The SObjectTree has no allornone-fag, too.

2
  • Have you considered adding/using an external id on the owner to built these relationships?
    – Gilhil
    Commented May 10, 2017 at 7:31
  • @Gilhil Do you mean local at my app or in Salesforce itself?
    – Tobonaut
    Commented May 10, 2017 at 11:29

1 Answer 1

2

You can create a field on cattleowner called external_Id__c type text and check both unique and external id checkbox in salesforce.

Then on creating the cattle you can reference the cattleOwner by its external id. for example:

{
    "name":"cattle1",
    "cattleOwner__r":
    {
        "unique_id__c": "myUniqueOwnerIdentifier"
    }
}

This will allow you to split up the call between 1 call for cattleOwners and a second call for the cattle without having to worry about the limit of 25

1
  • Thanks for this aw some tip! Nevertheless, I do not have the permission to update the salesforce object structure.
    – Tobonaut
    Commented May 11, 2017 at 6:05

You must log in to answer this question.

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