You need to sign in to do that
Don't have an account?
sancarlos94070
Have trouble invoking Apex in S-Control, even simple Apex won't work
Even very simple code won't work, nothing gets invoked. Please help. Thank you!
Apex:
lobal class myHelloWorld {
// eyCDUkymDHyd9MisHBFLPIYJm
webService static String getHelloWorld() {
String hello = 'Hello World';
return hello;
}
}
S-Control:
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/15.0/connection.js" type="text/javascript"></script>
<script src="/soap/ajax/15.0/apex.js" type="text/javascript"></script>
<script>
function getHello() {
var shello = sforce.apex.execute('myHelloWorld','getHelloWorld',());
alert(shello);
}
</script>
Apex:
lobal class myHelloWorld {
// eyCDUkymDHyd9MisHBFLPIYJm
webService static String getHelloWorld() {
String hello = 'Hello World';
return hello;
}
}
S-Control:
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/15.0/connection.js" type="text/javascript"></script>
<script src="/soap/ajax/15.0/apex.js" type="text/javascript"></script>
<script>
function getHello() {
var shello = sforce.apex.execute('myHelloWorld','getHelloWorld',());
alert(shello);
}
</script>
Test Page.
Best Answer chosen by Admin (Salesforce Developers)
sancarlos94070
Never mind, typo in this case.