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
Soujanya_CG123Soujanya_CG123 

Vote Object not Accessible in CS1

I am not able to create vote Object in Apex class version. Below is the code

 

public class Details{
    public Details(){
    }
   
    public void getDetails(){
        Vote[] voteDetails = [select id, type from Vote];
    }
}

 

When i try to save the above code error is thrown :

Error: Compile Error: Illegal assignment from LIST:SOBJECT:Vote to LIST:Vote at line 6 column 9 

 

 

This was workign fine before, but now when i am trying out with the same code I am not able to...

Thanks,
Soujanya.
Message Edited by Soujanya_CG123 on 03-09-2009 05:31 AM
A_SmithA_Smith
Make sure you are saving the class against the latest API version.  
Soujanya_CG123Soujanya_CG123

Hi,

 

Currently i am using latest version 15.0. I also tried with the older versions 14,13,12 but i facing the same problem.

 

 

Thanks,

Soujanya

Message Edited by Soujanya_CG123 on 03-11-2009 12:59 AM
A_SmithA_Smith

Sounds like a bug to me as your code worked fine in my org.  I would log a case with support so they can debug further.

  

Soujanya_CG123Soujanya_CG123

Thank you Smith.

 

Soujanya.