You need to sign in to do that
Don't have an account?
Ruben Vasco
Error in module "Manipulating Records with DML"
Hi,
I have a problem with module "Manipulating Records with DML"
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
My code is:
public class AccountHandler {
public static ID insertNewAccount(String nombre){
ID prueba =null;
Account cuent= new Account();
try {
cuent = new Account(Name=nombre);
insert cuent;
prueba = cuent.Id;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
}
System.debug('**********' +prueba);
System.debug('**********' +cuent.Name);
return prueba;
}
}
I would like you ayudaseis I find the error.
Thank you
I have a problem with module "Manipulating Records with DML"
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
My code is:
public class AccountHandler {
public static ID insertNewAccount(String nombre){
ID prueba =null;
Account cuent= new Account();
try {
cuent = new Account(Name=nombre);
insert cuent;
prueba = cuent.Id;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
}
System.debug('**********' +prueba);
System.debug('**********' +cuent.Name);
return prueba;
}
}
I would like you ayudaseis I find the error.
Thank you
Esther Onema