60  Points
Under Point Threshold
Idea hasn't met the 2,500-point review threshold. Give it an upvote or downvote.

Allow REST API composite batch subrequests to be processed in one transaction

API

I have a small collection of records that I want to update in Salesforce via the REST API. Say a dozen OpportunityLineItem records.

If I use a composite batch request with 12 subrequests then I get 12 different transactions to make the changes to each OpportunityLineItem individually. This results in the triggers and workflows all executing independently for 12 isolated transactions. 12 times the before triggers, 12 times the SOQL queries, 12 times the workflows, ...

I need a way to update this small set of records within a single transaction so the triggers can work on the records in bulk.

The Bulk API isn't a good option here due to its asynchronous nature. The user is waiting for these records to be updated and I'd prefer to avoid polling for the bulk job to finish.

Creating a dedicated Apex REST API is an option, but I'd prefer not to have to maintain a method for each small collection of records that need to be updated.

The SOAP API isn't a great option as the rest of the application is using the REST API.

Merge Idea · Flag

  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce.com takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.