function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael DsozaMichael Dsoza 

Create QuoteLineItems while creating Quote through Rest URL and JSON data via POST method

Hi, 

I am able to create Quote by using POST method with JSON data and REST URL as https://instance-name/services/data/v29.0/sobjects/Quote But I am not seeing any Quote Line Items in Quote.

I have given opportunity Id in json to create Quote thereafter is not creating QuoteLineItems which is already exist in opportunity as products.

My JSON data to create Quote is,
{
   "Name" : "NewTest",
   "OpportunityId" : "006U000000FqDTR",
}

Please reply what JSON format should I use, so that it will create QuoteLineItems too.

S DS D
Your JSON format is having an extra ',' at the end.  :)

 You can verify it using http://json2apex.herokuapp.com/?. After removing it, the JSON2Apex class is successfully created. 

Also, Could you share the APex Class which is working on this JSON data, would help in checking the issue?