Skip to main content
SHAIK MOULALI (HPE) 님이 #Trailhead Challenges에 질문했습니다

Hi All, this is Trail Head https://trailhead.salesforce.com/content/learn/projects/quickstart-vscode-salesforce/use-vscode-for-salesforce# Code : 

 

public with sharing class AccountController {

    public static List<Account> getAllActiveAccounts() {

      return [SELECT Id,Name,Active__c FROM Account WHERE Active__c = 'Yes'];

    }

  }

Getting Error : Unexpected token 'SELECT'.

 

Help me out how to resolve this...

답변 7개
  1. 2022년 1월 5일 오후 3:57

    Ah looks like you might be running the wrong command in the command palette.

    Can you double check that you're running this one?

     

     SFDX:Execute SOQL Query with Currently Selected Text

    and not...

    SFDX:Execute Anonymous Apex with Currently Selected Text

     

    From the image you supplied it looks like you are running the "Anonymous Apex" one, which in incorrect.

0/9000