
5 respuestas
I tried below code, I am able to save. You also try and see. Changes are in bold.@RestResource(urlMapping='/CaseAccountid/*')global with sharing class CaseAccountid{@HttpGet global static List<Case> getCaseById() { RestRequest req = RestContext.request; RestResponse res = RestContext.response; String ID= req.requestURI.substring(req.requestURI.lastIndexOf('/')+1); List<case> result = [Select id, subject, AccountId, OwnerId, ContactEmail from Case where AccountId = :ID]; return result; }}Please mark it best if it helps you. Thanks in advance.Regards,Pawan Kumar