Notes
HTTP Patch Method (@HTTPPatch
)
@RestResource(urlMapping='/Account/*')
global class RestCaseController {
@HTTPPatch
global static String createNewAccount(String acId, String acSite){
Account ac =[SELECT Id, Name FROM Account WHERE Id =:acId];
ac.Name= ac.Name +' updated';
ac.Site = acSite;
update ac;
return 'Account Updated';
}
}
We need to pass two parameters through workbench: