You need to sign in to do that
Don't have an account?
Losintikfos
External Service
Hi Experts,
I am using a button which is using a javascript to invoke an apex class. Basically i want to update my external database using the Apex class. But if click on the button i get an exception: args not specified.
JavaScript
=========
try{
var con = confirm("Are you sure you want to create Northstar account for this user?")
if (con)
var action = sforce.apex.execute("APiNorthstar","addAccount");
}
catch (exception)
{
alert ("Failed : " + exception);
}
Apex Class
=========
Do anyone know why this? please help!
Message Edited by Losintikfos on 07-31-2008 07:09 AM
I am using a button which is using a javascript to invoke an apex class. Basically i want to update my external database using the Apex class. But if click on the button i get an exception: args not specified.
JavaScript
=========
try{
var con = confirm("Are you sure you want to create Northstar account for this user?")
if (con)
var action = sforce.apex.execute("APiNorthstar","addAccount");
}
catch (exception)
{
alert ("Failed : " + exception);
}
Apex Class
=========
public class APiNorthstar {
public static void addAccount(){
//Get new Account
Account accs = new Account();
comNorthstarApi.NorthstarServiceHttpSoap11Endpoint stub = new
comNorthstarApi.NorthstarServiceHttpSoap11Endpoint();
String Id = accs.Id;
String name = accs.name;
String acc = accs.Account_Alias__c;
Boolean setName = stub.setNa(name);
Boolean setAccountAlias = stub.setAcca(acc);
}
}
Do anyone know why this? please help!
Message Edited by Losintikfos on 07-31-2008 07:09 AM
Try this
var action = sforce.apex.execute("APiNorthstar","addAccount",args:{});