Skip to main content
added 32 characters in body
Source Link
Sebastian Kessel
  • 13.2k
  • 12
  • 38
  • 61

Getting error isError1 and resultTwo variable does not exist.

    public boolean isError1{get;set;}
    public String resultTwo;
    AuraEnabled(cacheable=true)
    public static string We(){
        resultTwo='hello';
        isError1=true;
        return resultTwo;
    }
}```

public with sharing class erw {
    public boolean isError1{get;set;}
    public String resultTwo;
    AuraEnabled(cacheable=true)
    public static string We(){
        resultTwo='hello';
        isError1=true;
        return resultTwo;
    }
}

Getting error isError1 and resultTwo variable does not exist.

    public boolean isError1{get;set;}
    public String resultTwo;
    AuraEnabled(cacheable=true)
    public static string We(){
        resultTwo='hello';
        isError1=true;
        return resultTwo;
    }
}```

Getting error isError1 and resultTwo variable does not exist.

public with sharing class erw {
    public boolean isError1{get;set;}
    public String resultTwo;
    AuraEnabled(cacheable=true)
    public static string We(){
        resultTwo='hello';
        isError1=true;
        return resultTwo;
    }
}
Source Link
Varun
  • 1
  • 2
  • 3

Variable does not exist error in apex

Getting error isError1 and resultTwo variable does not exist.

    public boolean isError1{get;set;}
    public String resultTwo;
    AuraEnabled(cacheable=true)
    public static string We(){
        resultTwo='hello';
        isError1=true;
        return resultTwo;
    }
}```