You need to sign in to do that
Don't have an account?
Sales Force FRM
Compilation errors in apex code (Developer edition)
Hi Folks,
i am trying to run apex script (setup-->Develop-->APex Classes) in sales force developer ,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 developer ,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.
sObjectType
is not released until Summer 08
I think the best set up to minimize errors is to debugging and make many trials and adapt different set up everytime.