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
KS KumaarKS Kumaar 

can we update bulk records by using patch

can we update bulk records by using patch or put method with out using rest sourse class?
if it is possible please let me know with URI and Request body?

Thank you 

KS Kumar

Best Answer chosen by KS Kumaar
Amit Chaudhary 8Amit Chaudhary 8
You can try Composite Resources in Salesforce
1) http://amitsalesforce.blogspot.in/2015/05/rest-api-new-resources-summer-15.html

Method :- Post
URL :- /services/data/v34.0/composite/batch
Request Body
{
"batchRequests" : [
    {
		"method" : "PATCH",
		"url" : "v34.0/sobjects/account/0019000001hGWPa",
		"richInput" : { "name" : "SampleAccount1",
						"phone" : "1111111117",
						"website" : "www.salesforce1.com",
						"numberOfEmployees" : "100",
						"industry" : "Banking"
						}
    },
	
	{
		"method" : "PATCH",
		"url" : "v34.0/sobjects/account/0019000001hGWPb",
		"richInput" : { "name" : "SampleAccount2",
						"phone" : "2222222227",
						"website" : "www.salesforce1.com",
						"numberOfEmployees" : "100",
						"industry" : "Banking"
						}
    }
	]
}

NOTE:- Please replace id in URL
"url" : "v34.0/sobjects/account/0019000001hGWPb", ---------- Add real ID here

User-added image

Let us know if this will help you

Thanks
Amit Chaudhary