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
sreekanth vallepusreekanth vallepu 

i get illegal assignment

public with sharing class AccountinfoCtrl{
    @AuraEnabled
    public static List<Account> getAccounts() {
        List <Account> accList = [SELECT id,Name, AccountNumber,Phone,Fax, Industry From Account LIMIT 2];
        return accList;
    }
}
CharuDuttCharuDutt
Hii sreekanth vallepu

This might just be an internal error Just Comment the Code and Save and  Refresh the window Uncomment the code  And Cut and Paste it again And Save.
this might helps you.

Please Mark It As Best Answer If It Helps.
Thank you!
Ashish Kumar YadavAshish Kumar Yadav
Hi sreekanth vallepu

public with sharing class AccountinfoCtrl{
public static List<Account> accList{get;set;}

public AccountinfoCtrl(){
    accList = new List<Account>();
}
    @AuraEnabled
    public static List<Account> getAccounts() {
        accList = [SELECT id,Name, AccountNumber,Phone,Fax, Industry From Account LIMIT 2];
        return accList;
    }
}


Please Mark It As Best Answer If It Helps.
Thank you!
sreekanth vallepusreekanth vallepu
hi sir
what is the input components and output components could plsss tell me sir 
Ashish Kumar YadavAshish Kumar Yadav
Hi sreekanth vallepu,

you are talking about how take input in lightning and how to show output in lightning I am right?
find below link-
for input-:
https://developer.salesforce.com/docs/component-library/bundle/lightning:input/example

for output-:
https://developer.salesforce.com/docs/component-library/bundle/lightning:outputField/example