You need to sign in to do that
Don't have an account?

Illegal assignment from SObject to Account
I want to create a instance of account to update some field related to that accountRecord during lead conversion.
I am getting Illegal assignment from SObject to Account. How to resolve that?
Account ac = lc.getAccountRecord();
I am getting Illegal assignment from SObject to Account. How to resolve that?
Account ac = lc.getAccountRecord();
You can try this :
Account ac = (Account)lc.getAccountRecord(); //Typecast to Account
Hope it will help you.
Thanks
Niraj
All Answers
You can try this :
Account ac = (Account)lc.getAccountRecord(); //Typecast to Account
Hope it will help you.
Thanks
Niraj
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dml_convertLead.htm
getAccountId()
Gets the ID of the account into which the lead will be merged.
Signature
public ID getAccountId()
else do the type casting like below
Account ac = (Account)lc.getAccountRecord();
Let us know if this will help you