• biginthe50s
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

I have some JavaScript (on a custom button) that calls a webservice method. This works fine in my DEV edition instance, but I get an error when the code is executed in an Enterprise edition instance. The error is 'No service available for class 'SWRequestProcess.SWProcessRequestHelper''.

The code has been installed as part of an unmanaged (private listing) package so I have prefixed the classname with the package name but this still does not work.

 

Can anyone advise what the problem is?

 

This is the javascript:

{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/14.0/apex.js")} var result = sforce.apex.execute( "SWRequestProcess/SWProcessRequestHelper", // class "updateStatus", // method {vStatus:"Initial Request - Submitted", vName:"aaa" } ); 

 

This is the apex class:

global class SWProcessRequestHelper{ WebService static void updateStatus(String vStatus,String vName){ System.debug('updateStatus for vName [' + vName + '], vStatus [' + vStatus + '].'); SW_Process_Request__c request = [Select Name, Status__c from SW_Process_Request__c where Name = :vName]; request.LastStatus__c = request.Status__c; request.Status__c = vStatus; update request; } }