You need to sign in to do that
Don't have an account?

Unable to make an Account Object and set its name in Apex Test Class
I have an Apex Class Test in which I need to create a new Account Object and set its name, however when I use Account acc = new I have an Apex Class Test in which I need to create a new Account Object and set its name, however when I use Account acc = new Account(Name = 'ABC'), it shows me invalide field Name but Name is the API Name of the field in the Account Object, Can anyone please help me?
Used below code its work for me :
- Put class name and method Name acoording to your code.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi