Code
Contact con = new Contact();
con.FirstName='Thomas';
con.LastName='Miller';
con.email='thomas56@gmail.com';
List<Account> acList =[SELECT Id, Name
FROM Account
WHERE Name='Tom Wood Toyota'
LIMIT 1];
if(acList.isEmpty()){
Account ac = new Account(Name='Tom Wood Toyota');
insert ac;
con.AccountId=ac.Id;
}
else{
con.AccountId=acList[0].Id;
}
insert con;
Video
Video does not exists.