You need to sign in to do that
Don't have an account?
Ashok S 7
please explain antoher requirment details please
The Apex class must be called 'AccountHandler' and be in the public scope.
The Apex class must have a public static method called 'insertNewAccount'.
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.
The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
Please explain the following requirment
please explain antoher requirment details please
The Apex class must be called 'AccountHandler' and be in the public scope.
The Apex class must have a public static method called 'insertNewAccount'.
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.
The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
You need to create a class which contains a method, which will take a string as parameter, if string is not null, insert a new account with the string as name, if string is null, catch the DML exception. Like this: Let me know if any other help is needed. If this post helps you, mark it as best answer so it will help others in future.
Thanks,
Neetu