You need to sign in to do that
Don't have an account?
Marty Y. Chang
SOAP error from calling sforce.apex.execute method in JavaScript custom button
Does anyone have any ideas on why I’m getting this error when trying to execute Apex via Javascript in a custom button?
{faultcode:'soapenv:Client', faultstring:'The content of elements must consist of well-formed character data or markup.', }
I’m trying to following the example in the documentation below:
“Apex in AJAX”
My Apex class method is essentially as follows:
global class MyInterface { webService static void performInterfaceAction(List<Id> accountIds) { } }
My JS in the button is as follows:
{!REQUIRESCRIPT("/soap/ajax/21.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/21.0/apex.js")} var result = sforce.apex.execute("MyInterface", "performInterfaceAction", {!GETRECORDIDS( $ObjectType.Account )}); alert(result); location.reload(true);
Below code returns comma sepereted list of Ids , Not List<Id>, try with changing argument of service as string then work on it