I'm working on some Apex that needs to be called from a custom button on a page, which means that it needs to be declared as a 'static webservice' method in a 'global' class.
When I view this class in TWS, I notice that the class view, that sidebar to the left of the editor that shows the methods/fields/properties of the class, is empty or just contains the class name. This is strange but not really a problem. I also can't seem to get any code coverage numbers from the tests for this class, which is a problem.
I don't know if the two issues are related but I have found that if I remove the 'webservice' scope from my method, the class view fills in correctly. I still don't get code coverage numbers though.
The class looks something like this:
When I view this class in TWS, I notice that the class view, that sidebar to the left of the editor that shows the methods/fields/properties of the class, is empty or just contains the class name. This is strange but not really a problem. I also can't seem to get any code coverage numbers from the tests for this class, which is a problem.
I don't know if the two issues are related but I have found that if I remove the 'webservice' scope from my method, the class view fills in correctly. I still don't get code coverage numbers though.
The class looks something like this:
global class SomeApi
{
global static string LastError {get; private set;}
global static void Prep(HttpRequest param1, string param2)
{
.
.
}
static webservice string DoStuff (string someParam)
{
.
Prep(...);
.
}
}