Illegal assignment from LIST<Account> to Account

2,194 views
Skip to first unread message

Mallik

unread,
Mar 28, 2011, 2:56:28 AM3/28/11
to salesforce professionals
Hi,

When I included SOQL query in Apex class am getting error. I
referred some books.

But the syntax is looking correct. The query is ................

List<Account> aa = [select id, name from account where name =
'Buddy'];

ane getting error is:

Error: Compile Error: Illegal assignment from LIST<Account> to Account
at line

can anyone send me solution. pls.

Mohit Pant

unread,
Mar 28, 2011, 2:59:50 AM3/28/11
to salesforce-p...@googlegroups.com, Mallik

rohit aggarwal

unread,
Mar 28, 2011, 3:04:06 AM3/28/11
to salesforce-p...@googlegroups.com, Mallik
Syntax is correct , it happens some time in salesforce . Just delete the class and recreate again . It should work fine if not than try this

List<Sobject> aa = [select id, name from account where name =
'Buddy'];

Rohit

On Mon, Mar 28, 2011 at 12:26 PM, Mallik <sfdcm...@gmail.com> wrote:

Ravindra Babu Nagaboina

unread,
Mar 28, 2011, 7:34:36 AM3/28/11
to salesforce-p...@googlegroups.com
once try this
List<sObject> Obj = [select id, name from account where name =: 'Buddy'];
--
Thanks & Regards.. 
Ravindra Babu Nagaboina
SFDC Developer, AppShark Pvt Ltd
Hyderabad

mallik naga

unread,
Apr 2, 2011, 4:39:55 AM4/2/11
to salesforce-p...@googlegroups.com
Hi,

  I,m working on approvals. I,ve completed the approval assignment process.
  The record  is locked when user sends an  approval to the Manager.
  Manager is getting approval request  to his mail. But The requests are not able to see When he opens salesforce account.
  Where the manager can accept/reject this approval.   But i read that  pending approval requests will appear  on Manager's home tab.
  Pls giv me solution.


   Regards,
   Mallik
 

yashvinder singh

unread,
Apr 2, 2011, 6:35:06 PM4/2/11
to salesforce-p...@googlegroups.com
Not really sure if this answers but there is a home page component called Items to Approve which you need to add to the Home Page Layout. This shows a list of all the items that need to be approved. Let me know if this helps.
Yash
Reply all
Reply to author
Forward
0 new messages