You need to sign in to do that
Don't have an account?
rajesht
compilation errors in Apex code
Hi Folks,
i am trying to run apex script (setup-->Develop-->APex Classes) in sales force sandbox,which is as follows:
how can i overcome this compilation error.
and how to run this code if compiled successful.
i am trying to run apex script (setup-->Develop-->APex Classes) in sales force sandbox,which is as follows:
1 public class sObjectTest
2 {
3 // Create a generic sObject variable
4 sSObject s = Database.query('select id from account limit 1');
5 // Verify if that sObject variable is an Account token
6 System.assertEquals(s.getSObjectType(), Account.sObjectType);
7 // Create a list of generic sObjects
8 List<sObject> l = new Account[]{};
9 // Verify if the list of sObjects contains Account tokens
10 System.assertEquals(l.getSObjectType(), Account.sObjectType);
11 }
when try to to save the code it's giving following errors:
Error: Compile Error: unexpected token: at line 6 column 37 |
how can i overcome this compilation error.
and how to run this code if compiled successful.
Sandbox is not yet on Summer 08 release, this is scheduled to upgrade Friday night, try again then.
pre-release docs
http://www.salesforce.com/us/developer/docs/apexcodepre/index.htm