5. Advanced Business Logic

In the preceding chapter, you learned the basics of the Apex language for developing business logic. This chapter extends your knowledge of Apex to reach more features of the Force.com platform. The following topics are covered:

Image Aggregate SOQL queries—Aggregate queries operate on groups of records, summarizing data declaratively at the database level rather than in Apex.

Image Additional SOQL features—SOQL includes features for querying related objects and multi-select picklists.

Image Salesforce Object Search Language (SOSL)—SOSL is a full-text search language, a complement to SOQL, that allows a single query to search the textual content of many database objects and fields.

Image Transaction processing—Apex includes database methods to enable the partial success of transactions, saving and restoring of database state, and locking of records returned from a query.

Image Apex managed sharing—Managed sharing allows programmatic control over record-level sharing.

Image Sending and receiving email—Apex programs can send and receive email with support for text and binary attachments and templates for standardizing outbound messages.

Image Dynamic Apex—Execute database queries that aren’t hard-coded into your programs, query Force.com for your database’s metadata, and write generic code to manipulate database records regardless of their type.

Image Custom settings in Apex—Data from custom settings can be retrieved, created, updated, and deleted from Apex.

Image Sample application—The Services Manager sample application is enhanced to send email notifications to users when a business event occurs.


Note

The code listings in this chapter are available in a GitHub Gist at http://goo.gl/q65M4.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.57.43