Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

I need to insert few rows into OpportunityLineItem table within single POST request https://*.salesforce.com/services/data/v20.0/sobjects/OpportunityLineItem

Single insert works ok for me: {"OpportunityId":"xxx","Quantity":1,"UnitPrice":100,"PricebookEntryId":"xxx"}

But it fails when I try to POST multiple records {"records" : [{"OpportunityId":"xxx","Quantity":1,"UnitPrice":100,"PricebookEntryId":"xxx"}, {"OpportunityId":"xxx","Quantity":4,"UnitPrice":110,"PricebookEntryId":"xxx"}]}

1 Answer

0 votes
by (32.1k points)
It is not possible for you to add multiple rows in a REST API. You need bulk API for this.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...