function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Narendra S 3Narendra S 3 

Create an Account and related Contact

Challenge Not yet complete... here's what's wrong: 
The 'Smith Enterprises' account record could not be found or it does not have the correct values for the 'Type' and 'Industry' fields
NagendraNagendra (Salesforce Developers) 
Hi Narendra,

First of all, make sure that you are working on a brand new developer org.

The error itself says that no such record is existing in your developer account.
From the trailhead module while copying the account name sometimes, there will be a space included, make sure that there is no space after the record name "Smith Enterprises"
The next concern is the record name "Smith Enterprises" should definitely have Type = 'Prospect', and Industry = 'Energy' as its values.
If you have the record name as ''Smith Enterprises" and type and industry values as something else still, trailhead doesn't validate the challenge.

Please mark it as best answer if it helps you.

Best Regards,
Nagendra.P
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000kJ94IAE

User-added image

Let us know if this will help you
Narendra S 3Narendra S 3
Thanks for Supporting,
I tried like that, till its showing
User-added image
Please Help how to do this
Suraj Tripathi 47Suraj Tripathi 47
Hi Narendra,

You can take references from the below code in this way we can create an account and related contact.
Account accountObj = new Account();
accountObj.Name='acc1';
insert accountObj;
Contact contactObj = new Contact();
contactObj.LastName = 'con1';
contactObj.AccountId = accountObj.Id;
insert contactObj;

If you find your Solution then Mark this as Best Answer

Thank you!

Regards,
Suraj Tripathi