• rajesht
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 0
    Replies
    Hi Folks,
                  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.
Hi Folks,
                   
                        I have  a WSDL file ,when i gernerate a  class files from this it's geberated 21 classes and i want to run the following example which include import as follows(it is a example from apex code development pdf document):

package com.doc.samples;
import java.io.*;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import com.sforce.soap.enterprise.*;
import com.sforce.soap.enterprise.fault.ExceptionCode;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.enterprise.sobject.Contact;

the imports which are in red not recogined bcz these classes are not in the jar file which i have extracted from WSDL file So what iam thinking is may be i have a wrong apex wsdl file , so can any one suggest me to download the correct apex wsdl file  to generate all classes include which are marked in red! i have a 1 month subscription developer account.


Regards,
Rajeshwar.
Hi Folks,
                     How can i connect to sales force using Apex code API, can any explain how it can be done pls.

Thanks,
rajesh
    Hi Folks,
                     How can i connect to sales force using Apex code API, can any explain how it can be done pls.

Thanks,
rajesh
    Hi Folks,
                   
                        I have  a WSDL file ,when i gernerate a  class files from this it's geberated 21 classes and i want to run the following example which include import as follows(it is a example from apex code development pdf document):

package com.doc.samples;
import java.io.*;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import com.sforce.soap.enterprise.*;
import com.sforce.soap.enterprise.fault.ExceptionCode;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.enterprise.sobject.Contact;

the imports which are in red not recogined bcz these classes are not in the jar file which i have extracted from WSDL file So what iam thinking is may be i have a wrong apex wsdl file , so can any one suggest me to download the correct apex wsdl file  to generate all classes include which are marked in red! i have a 1 month subscription developer account.


Regards,
Rajeshwar.