Insert a tagged Account
insert saves a new record and writes the new Id back onto the same variable.
Your task
Insert one uniquely tagged Account and check the saved row by its new Id.
String tag = 'AS-INSERT-' + UserInfo.getUserId() + '-' +
String.valueOf(Datetime.now().getTime());
Account acct = new Account(
Name = tag,
Description = 'Created by ApexSensei'
);
List<Account> saved = new List<Account>();Requirements
insert acct;should be presentId = :acct.Idshould be present- No Id yet should be printed as
Id before insert: null - The new Id should be printed as
Id assigned: true - The saved row should be printed as
Saved count: 1 - The saved Name should be printed as
Name matches: true