Create Sample Accounts in Your Org

To complete this exercise, add the following sample data in your org.
  1. Enter this code in the Source to execute field of the Execute Anonymous pane.
  2. Click Execute Anonymous.

    If you get a compile error after executing this code, make sure that Account.rating is visible to your user. To give yourself access to the Account object’s Rating field, from Setup, enter Field in the Quick Find box, then click Account | Fields | Rating | Set Field-Level Security or Field Accessibility | Account | View by Fields | Rating.

    Note

  3. In the Accounts tab of the Salesforce user interface, verify that your accounts have been created.
    Congratulations. Your org now contains all the data that you need to complete the debugging exercise.