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
Hiral Patel 25Hiral Patel 25 

list<Contact> lstContacts =[SELECT Id,FirstName, LastName, Email, Phone, accountID FROM Contact Where accountid =: accountRecordID];

i show error in this line like Illegal assignment from List<Contact> to List<contact>

list<Contact> lstContacts =[SELECT Id,FirstName, LastName, Email, Phone, accountID FROM Contact Where accountid =: accountRecordID];
sachinarorasfsachinarorasf

Hi Hiral,
You can use the below piece of code.

List<Contact> lstContacts = new List<Contact>():
lstContacts  = [SELECT Id,FirstName, LastName, Email, Phone, AccountID FROM Contact Where Accountid =: accountRecordID];
I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.
Thanks and Regards,
Sachin Arora
www.sachinsf.com