Update a tagged Account
update saves changed fields on a record that already has an Id.
Your task
Update one tagged Account's Description and read the database before and after to prove the change.
String tag = 'AS-UPDATE-' + UserInfo.getUserId() + '-' +
String.valueOf(Datetime.now().getTime());
Account acct = new Account(Name = tag, Description = 'Pending');
insert acct;
Id originalId = acct.Id;
List<Account> saved;Requirements
update acct;should be presentId = :originalIdshould be presentDescription = 'Reviewed'should be present beforeupdateand the query by Id- The value before the update should be printed as
Before update: Pending - The new Description should be printed as
After update: Reviewed - The updated row should be printed as
Updated count: 1 - The tagged Name should be printed as
Name still tagged: true