Methods with 'webservice' scope break class view & code coverage?

The Welkin Suite Forum

Methods with 'webservice' scope break class view & code coverage?



Methods with 'webservice' scope break class view & code coverage?

  • Please log in to reply

#1

dave

    Posted 16 Nov 2016

    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:

    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(...);
    .
    }
    }


    3 replies to this topic

    #2

    kate.dulko

      Posted 18 Nov 2016

      Hi Dave,



      Thank you for your contacting us with these issues.

      They are separate and not related.

      The issue when the Code Map with methods/fields/properties in a class is absent when you use 'webservice' method will be solved in the next version of TWS that will be available for you tonight.

      Our developers are working on the Code Coverage issue. This will be fixed in the incoming version of the IDE or we will release update the next week.



      Best regards,

      Kate

      Kate Dulko
      Customer Relations

      The Welkin Suite

      twitter: @KateDulko
      skype id: d_katerina
      e-mail: kate.dulko@welkinsuite.com

       

        


      #3

      dave

        Posted 19 Nov 2016

        Excellent. Thanks, Kate.

        edit: I see both of these fixed in R4 - thanks for the quick turnaround!


        #4

        kate.dulko

          Posted 21 Nov 2016

          Hi Dave,



          Thank you for your feedback.

          We do our best to keep your working process good.



          Have a nice week.

          Best regards,

          Kate

          Kate Dulko
          Customer Relations

          The Welkin Suite

          twitter: @KateDulko
          skype id: d_katerina
          e-mail: kate.dulko@welkinsuite.com

           

            





          Boost Your Productivity. Get Started Today

          Try Free Trial