You need to sign in to do that
Don't have an account?
TEJESWARI TEJU
validate crud permission error
/**
* @description :
* @author : ChangeMeIn@UserSettingsUnder.SFDoc
* @group :
* @last modified on : 04-05-2023
* @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
**/
public class AccountController {
@AuraEnabled
public static list<Account> getAccounts(){
//declaring list of accounts
list<Account> lstAcc = new list<Account>();
try {
lstAcc = [SELECT Id, Name, Phone,Rating,Type FROM Account];
} catch (Exception e) {
throw new AuraHandledException(e.getMessage());
}
return lstAcc;
}
}
* @description :
* @author : ChangeMeIn@UserSettingsUnder.SFDoc
* @group :
* @last modified on : 04-05-2023
* @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
**/
public class AccountController {
@AuraEnabled
public static list<Account> getAccounts(){
//declaring list of accounts
list<Account> lstAcc = new list<Account>();
try {
lstAcc = [SELECT Id, Name, Phone,Rating,Type FROM Account];
} catch (Exception e) {
throw new AuraHandledException(e.getMessage());
}
return lstAcc;
}
}
The Code that you have provided , it does not appear to implement any CRUD (Create, Read, Update, Delete) operations, so there shouldn't be any CRUD permission errors.
Please share the full code.
Thank you .