+ Start a Discussion
DevelopersDevelopers 

Variable does not exist: currentCase

Hi,

 

In my project, i got the requirement to execute the apex methods from java script. For that, i need to change the existed normal apex method to web service methods to be used in java script.

 

In my project, the apex controller developed already. while changing the code to web service i am getting the error like:

Variable does not exist.

 

The variables which are declared with in the class can not be accessed in the method with in the same class.

 

Please suggest how to change the normal apex to web services.

 

Thanks in advance.

 

Regarsd,

Kumar

Sonam_SFDCSonam_SFDC

When coverting a Apex class to webservice, the class has to be defined as global.

Could you please confirm if that is the case in your class?

 

Also, go through the sample code in the following link  describing a webservice:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_web_services_methods_considerations.htm

 

This should give you an idea of how a webservice class is created..