+ Start a Discussion
vajralavajrala 

How to run the apex class in Force.com ide

I am to Force.com ide Please give me solutions how to configure ide and run apex class

Best Answer chosen by Admin (Salesforce Developers) 
priyanka.mv26priyanka.mv26

Follow the steps below

 

1. Create Force.com project

2. Enter ur credentials and next

3. Click on first option to select Apex classes, triggers..

4. Your project will be created.

5. Select the class from the left side pane and open the code

6. You will find execute anonymous tab below

7. Let us consider the class name as 'MyClass'

then write the below code in Execute Anonymous to invoke your apex class and click execute button

MyClass obj = new MyClass();

obj.ClassMethod();

8. Note if your class has parameterized constructor, pass the parameter while creating object for the class

All Answers

priyanka.mv26priyanka.mv26

Follow the steps below

 

1. Create Force.com project

2. Enter ur credentials and next

3. Click on first option to select Apex classes, triggers..

4. Your project will be created.

5. Select the class from the left side pane and open the code

6. You will find execute anonymous tab below

7. Let us consider the class name as 'MyClass'

then write the below code in Execute Anonymous to invoke your apex class and click execute button

MyClass obj = new MyClass();

obj.ClassMethod();

8. Note if your class has parameterized constructor, pass the parameter while creating object for the class

This was selected as the best answer
vajralavajrala

ok its working Thank you .I hava another doubt how to priview the visualforce pages in IDE

please give me reply

priyanka.mv26priyanka.mv26

As of now this feature is yet not supported by IDE.