Create an Apex Class
何もしないで検証ボタンを実行
The 'OlderAccountsUtility' Apex class was not found
public class OlderAccountsUtility {
}
Add a Method to the Class
何もしないで検証ボタンを実行
The 'updateOlderAccounts' method did not update account records as expected
public class OlderAccountsUtility {
public static void updateOlderAccounts() {
// Get the 5 oldest accounts
Account[] oldAccounts = [SELECT Id, Description FROM Account ORDER BY CreatedDate ASC LIMIT 5];
// loop through them and update the Description field
for (Account acct : oldAccounts) {
acct.Description = 'Heritage Account';
}
// save the change you made
update oldAccounts;
}
}
Invoke and Test the Code
何もしないで検証ボタンを実行 --> 合格してしまった
Verify the Updated Accounts
何もしないで検証ボタンを実行 --> 合格してしまった