0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Quick Start: Apex

Last updated at Posted at 2023-09-19

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

何もしないで検証ボタンを実行 --> 合格してしまった

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?