function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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..