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
ricardo@cloud2b.com.brricardo@cloud2b.com.br 

Problem with WebService

Hello People,

 

I have the class:

 

global class Parcelamento {

     Webservice static String Parcela(String idOpp){
          return Parcelamento.ExecutarParcelamento(idOpp);
      }

      public static String ExecutarParcelamento(String idOpp){ 

           //operations

      }

 } 

and my class test is:

 

private class testParcelamento {

     static testMethod void myUnitTest() {
         Parcelamento.ExecutarParcelamento([Select id from Opportunity limit 1].id);
     }
}

And my error is:  Save error: Method does not exist or incorrect signature: Parcelamento.ExecutarParcelamento(Id)

 

Help me.

 

Thank you 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
NiketNiket

Hi ,

 

I just tried you code and I didn't get the error which you mentioned here.

 

I would like to mention here that I just include a single line

 

return null;

 

in the defenation of ExecutarParcelamento method in class Parcelamento .

 

Please try it once again and let me know if you still face the issue.

 

Please mark it as the solution if it answers your question.

 

Cheers ,

Niket

Certified Administrator | Certified Developer

MyBlog

 

 

 

 

All Answers

NiketNiket

Hi ,

 

I just tried you code and I didn't get the error which you mentioned here.

 

I would like to mention here that I just include a single line

 

return null;

 

in the defenation of ExecutarParcelamento method in class Parcelamento .

 

Please try it once again and let me know if you still face the issue.

 

Please mark it as the solution if it answers your question.

 

Cheers ,

Niket

Certified Administrator | Certified Developer

MyBlog

 

 

 

 

This was selected as the best answer
rgdcrgdc

Thank you very much for your answer.

 

I delete the test class and recreated the class.