Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Apex Programming

You're reading from   Learning Apex Programming Create business applications using Apex to extend and improve the usefulness of the Salesforce1 Platform

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781782173977
Length 302 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Apex Assumptions and Comparisons 2. Apex Limits FREE CHAPTER 3. More and Later 4. Triggers and Classes 5. Visualforce Development with Apex 6. Exposing Force.com to the World 7. Use Case – Integration with Google Calendar 8. Creating a Property Management Application 9. Test Coverage Index

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "This means that it will not be possible to set the AnnualRevenue variable to a string or IsCustomerPortal to a date."

A block of code is set as follows:

trigger accountTrigger on Account (after insert, after update){

  //Use the Boolean attributes to quickly determine where we are in the order of execution and what operation occurred.
  if ( trigger.isAfter && trigger.isInsert ){
    for ( Account a : trigger.new ){
      if ( a.Phone != null ){
        system.debug(a.Phone);
      }
    }
  }
  if ( trigger.isAfter && trigger.isUpdate ){
    for ( Integer i=0;i<trigger.size();i++ ){
      if ( trigger.new[i].phone != trigger.old[i].phone ){
        system.debug(
        trigger.new[i].phone +'!='+ trigger.old[i].phone 
        );
      }
    }
  }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public with sharing class googleAuthorization_Controller {
  public string googleEmail {get;set;}
  //to store our code for dynamic rendering
  public string code {get;set;} 
  //to store our user record
  public User u {get;set;}
  public googleAuthorization_Controller() {
    googleEmail = userInfo.getUserEmail();
  }

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the Setup link at the top-right of the Force.com GUI. Under the Customize section, click on Users (these are not in alphabetical order)."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image