No able to Call Apex Webservice(SOAP API) Method in Skuid

  • 1
  • Question
  • Updated 3 years ago
  • Answered
  • (Edited)
Trying to call a apex remote method in Skuid,but getting this error :
Uncaught {faultcode:'soapenv:Client', faultstring:'No service available for class 'TestClass' ', }

Here is my Apex code : 

global class TestClass {
    webservice static string testMe(String str){
        return 'Success';
    }

}

I have added AJAX Toolkit in resource as External type,as per the below link
https://community.skuidify.com/skuid/topics/calling_apex_function

Inline-Script :

var params = arguments[0], $ = skuid.$;

var result = sforce.apex.execute("TestClass","testMe",{str:'test'}); 
console.log(result);

getting this error " Uncaught {faultcode:'soapenv:Client', faultstring:'No service available for class 'TestClass' ', }
Photo of Amritesh Singh

Amritesh Singh

  • 90 Points 75 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Amritesh,

Is the org you are working in a managed package development org that has a namespace? If so you would need to include the namespace in your call, e.g. if your package's namespace is acmethen you need to add acme/before your class name like this:

var result = sforce.apex.execute("acme/TestClass","testMe",{str:'test'}); 
Photo of Amritesh Singh

Amritesh Singh

  • 90 Points 75 badge 2x thumb
Thank you Zach. Its working fine now.
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Hi Amritesh, 

Sorry for coming in late, but I faced a similar use case.  You can view my experience here:

https://community.skuidify.com/skuid/topics/javascript-remoting-and-skuid?topic-reply-list%5Bsetting...

Hint: Search the community -- there are soooo many nuggets to be found!

Regards,
Irvin
Photo of Amritesh Singh

Amritesh Singh

  • 90 Points 75 badge 2x thumb
Hi Irvin,

Thank you for your reply.Before posting my query I went to the link you mentioned above. I did get to know something new how to call remote method from Skuid.