There has been so much to cover in the release notes for Summer ’13, that I haven’t even touched on the features available for developers. There are some great things in this release for the developers as well! Here are some of my favorites.
There is a new object called RecentlyViewed, that will be quite helpful. It allows you to query the recently viewed items list. It looks like the list stores the last 200 records per object that a user has viewed. You can’t query what another user has viewed, it only shows the current user’s recently viewed records.
In addition to this new object there are some new SOQL clauses: FOR VIEW and FOR REFERENCE. When you use either of these clauses in your SOQL queries, it will add the records returned to the RecentlyViewed object. While both clauses will update the RecentlyViewed object, they are meant to be used slightly differently. VIEW means the record has been viewed. REFERENCE means a related record has been viewed.
New Developer Console
The Developer Console has been updated with a new look and feel. That is all well and good, but the coolest new feature is Apex Code Completion. Completions are provided for Apex system objects and methods, user-defined objects and methods, and sObjects and fields. Just type Ctrl+Space to see your options.
This is a great new feature that will make testing your classes much easier. If you have private methods in a class, you can use the TestVisible annotation to make those private methods visible to test classes. This allows you to directly test the methods rather than rely on methods you do have access to. It makes finding bugs much simpler. There’s a good example in the release notes that shows how to use this new annotation.
DML Before Mock Callouts
Finally, this has been fixed! Mock callouts are great because they allow you to test your callouts rather than wrapping them with System.isRunningTest. The problem with these mockups before the summer release is that you can’t do any DML before the mock callout. That means you can’t setup any test data. Now you can insert test data before the callout is tested.
Test Methods Must Be in Test Classes
OK, this isn’t really something to be excited about, but it is important to note. To read up on why this change is important, read this great post on the topic.