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
SFUserSFUser 

i am getting this error while invoking our Org from Third party Services..i.e. Workbench tool

User-added image
i am getting this error while invoking our Org from the Third party Services..i.e. Workbench tool.. this is a @httpGET method.
SFUserSFUser
and Apex code is...


@RestResource(URLMapping='/LeadRecordService/*')
Global class LeadRecordBasedOnID
{
    @HttpGet()
    Global static lead GetRecordByID()
    {
        Map<String, string> mapInputs =    RestContext.request.Params;
                        
        lead leadRecord = [Select id, firstname, lastname
                                          from lead
                                              Where id =: mapInputs.Get('Id')];
        return leadRecord;
    }
}