• Raja Narendra 5
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
@RestResource(URLMapping = '/OpportunityService/*')
global class OpportunityRecord 
{
    @HttpGet()
    global static list<Opportunity> GetOpportunityRelated ()
    {
        
      Map<string, string> inputParams = RestContext.request.Params;
        
        list<Opportunity> lstOpportunity = [select id,name, amount, stagename, closedate, accountId, Account.Name
                                             from Opportunity where Account.Name =: inputParams.Get('accName')];
        
        return lstOpportunity;
        
    }
}