You are previewing Force.com Tips and Tricks.
O'Reilly logo
Force.com Tips and Tricks

Book Description

A quick reference guide for administrators and developers to get more productive with Force.com

  • Tips and tricks for topics ranging from point-and-click administration, to fine development techniques with Apex & Visualforce

  • Avoids technical jargon, and expresses concepts in a clear and simple manner

  • A pocket guide for experienced Force.com developers

  • In Detail

    Force.com is an extremely powerful, scalable and secure cloud platform, delivering a complete technology stack covering the ground from database and security to workflow and user interface.

    Force.com Tips and Tricks starts with very basic admin tasks and gradually moves to hard-core coding tips and tricks for the multitenant Force.com platform.

    The book starts with the basics of Cloud Computing and Principles and constructs of Force.com. The book then swiftly move to detailed coverage of Salesforce analytics. The book also shows how to set up development environments and and gives detailed understanding of tools and destinations that every Force.com developer should know. The book also covers important administration concepts where you gain vital information for key topics such as schema and reporting for an organization. For Force.com, troubleshooting a problem and code reuse are two important aspects that help in boosting productivity, a complete chapter is dedicated to these tasks.

    This book takes you beyond any documentation or course and promises hands-on expertise.

    Table of Contents

    1. Force.com Tips and Tricks
      1. Table of Contents
      2. Force.com Tips and Tricks
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
          3. Instant Updates on New Packt Books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. When to adopt cloud computing
        5. When to adopt Force.com for your project
        6. Conventions
        7. Reader feedback
        8. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Learning to Fly with Force.com
        1. What is cloud computing?
          1. Infrastructure as a service (IaaS)
          2. Platform as a service (PaaS)
          3. Software as a service (SaaS)
        2. What is Force.com?
          1. What empowers Force.com?
            1. Multitenancy
            2. Metadata
          2. Understanding the Force.com stack
            1. Infrastructure as a service
            2. Database as a service
            3. Integration as a service
            4. Logic as a service
            5. User interface as a service
            6. Development as a service
            7. Force.com AppExchange
          3. Introduction to governor limits
        3. Salesforce environments
        4. Summary
      9. 2. Admin Tools
        1. Data Loader
          1. When to use Data Loader
          2. Strategy to import data
            1. Identifying data sources
            2. Data preparation
            3. Testing the data import
            4. Analyzing the test import
            5. Final data import
            6. Validating the import
          3. Using Data Loader for data export
          4. Using Data Loader for uploading attachments
        2. The Import wizard
          1. When to use the Import wizard
          2. Notes on data import
          3. Undoing data import
        3. Third-party tools for data integration
        4. Force.com Integrated Development Environment (IDE)
          1. IDE communication
          2. Force.com perspective
          3. Problems view
          4. Execute Anonymous view
          5. Apex Test Runner view
          6. Schema explorer
          7. Deployment
        5. Force.com Migration Tool
        6. AppExchange – cloud application marketplace
          1. DupeCatcher – real-time deduplication
          2. Milestones PM – project and task management
          3. Salesforce CRM dashboards
          4. Salesforce for Twitter and Facebook (v4)
          5. Appirio Contact Sync for Salesforce and Google Apps
          6. Ribbit for Salesforce
          7. SnapShot Change And Release Management
          8. Salesforce Adoption Dashboards (2011)
          9. Survey Force
          10. Draggin' Role
          11. Find Nearby – Accounts, Contacts, Leads – Managed, PE/EE/UE/DE
          12. AppExchange Dashboard Pack
          13. Action Plans – v3 – Unmanaged – EE, UE, and DE
          14. Project and Issue Management
          15. CloudConverter for Force.com
          16. Opportunity Planning Wall
          17. Data Loader – Salesforce integration
          18. Mass Edit + Mass Update + Mass Delete
          19. Implementation Cloud – project management app
          20. S-Docs – free document generator (PDF, Word, Excel)
          21. CMSForce 2
          22. FormFactory quotes and invoices
          23. Chatter Usage Dashboards – Force.com Labs
          24. FinancialForce Accounting for Salesforce
          25. Professional Services Automation – PSA for Salesforce
          26. CVM Supplier Central Enterprise Edition
          27. CVM Supplier Locator
        7. Summary
      10. 3. Making Best Use of Salesforce Objects
        1. Understanding the field types
          1. Basic non-relational field types
          2. Relational field types
          3. Identity fields
          4. System fields
          5. The Name field
          6. Additional database features
        2. Considerations for relationships
        3. Types of objects
          1. Standard objects
            1. Account
            2. Contact
            3. Lead
            4. Campaign
            5. Opportunity
            6. Forecast
            7. Quote
            8. Product and price book
            9. Case
          2. Custom objects
            1. Design approach
              1. Data
              2. Relationships
              3. User interface
            2. Implementation steps
            3. Tips
              1. Custom objects
              2. Relationships
              3. Custom tabs
              4. Page layouts
        4. Record types
        5. Summary
      11. 4. Understanding Analytics
        1. Report types
          1. Tips and considerations for report types
            1. Defining report types
            2. Choosing object relationships
            3. Adding lookup fields
        2. Reports
          1. Organizing reports
          2. Working with reports
            1. Creating reports
              1. Building custom summary formulas
              2. Bucketing in reports
              3. Using conditional highlighting
            2. Subtotaling the report results
              1. Filtering on reports
                1. Tips for entering filter criteria
                2. Tips for filter logic
            3. Running reports
            4. Scheduling a report
            5. Printing and exporting reports
          3. Report charts
            1. Combination charts
          4. Dynamic reports
        3. Dashboards
          1. Working with dashboards
          2. Dashboard filters
          3. Dashboard data refresh
        4. Analytic snapshots
          1. Tips for analytic snapshots
            1. Tips on source reports
            2. Tips on target objects
        5. Summary
      12. 5. Setting Up Development Environments
        1. Building apps on Salesforce
        2. What is an environment?
          1. Production environment
          2. Development environments
          3. Sandbox orgs
            1. Configuration-only sandbox
            2. Developer sandbox
            3. Full sandbox
            4. Typical uses of sandboxes
            5. Tips for creating or refreshing a sandbox
          4. Developer Edition orgs
            1. Individual versus partner DE
            2. When to use individual DE org
            3. When to use partner DE org
          5. Tips and best practices
            1. Choosing a development environment
            2. Development considerations
          6. Testing environments
            1. When to use a Partner Test Edition org
            2. When to use a sandbox org
          7. Various development scenarios
            1. Scenario 1
            2. Scenario 2
            3. Scenario 3
        3. Migrating changes between environments
          1. Migrating changes manually
            1. Establishing a change process for production org
              1. Best practices for change processes
            2. Tracking changes
          2. Metadata migration
            1. Migration using change sets
              1. Best practices for using change sets
            2. Migrating metadata files
        4. Application lifecycle management
          1. Production development
          2. Developing with sandbox
          3. Isolating development and testing
          4. Multiple project development with integration, UAT, and staging
          5. Developing enterprise applications
        5. Summary
      13. 6. Tools and Destinations that Every Force.com Developer Should Know
        1. Tools for developers and admins
          1. Choosing the right IDE
            1. Force.com IDE based on Eclipse
              1. Using Eclipse already?
            2. Developer console based on your browser
            3. Sublime Text plugin for Force.com
          2. Exploring objects, fields, and relationships using Schema Browsers
            1. Schema Builder
            2. Force.com Explorer
            3. SoqlXplorer
          3. Data Loaders
            1. Data Loader for Windows
            2. Force.com Excel Connector
            3. LexiLoader for Mac OS
          4. Utility tools and apps for productivity boost
            1. Force.com migration tool
            2. Salesforce Workbench
            3. Force.com Security Code Scanner
            4. Force.com Utility Belt
            5. Trapdoor (Mac OS only)
          5. Toolkits and libraries
        2. Destinations
          1. developer.force.com
          2. Open source goodness
          3. Queries and troubleshooting
        3. Summary
      14. 7. Writing Better Apex Code
        1. Understanding the language basics
          1. Using the correct nomenclature for code files
          2. Language constructs
            1. Finding what's different with static keywords
            2. Simplifying the loops
            3. Making constants better with enums
            4. Reducing script statements
        2. Advanced Apex
          1. Security data access via the with sharing keyword in classes
          2. Enforcing CRUD and FLS
          3. Writing better SOQL queries
            1. Query-required fields only
            2. Using SOQL for loops
            3. Executing selective and index-based queries
            4. Combining multiple SOQLs to avoid governor limits
            5. Fixing SOQL that returns a single record
            6. Making the most out of dynamic SOQL
              1. Variable binding in SOQL
              2. Taking care of errors and security
          4. Taking control on DML operations
            1. Controlling transaction commits and rollbacks
            2. Fine-tuning with extra DML options
            3. Error handling during DML operations
          5. Decoding the Apex Describe Information
            1. Getting info about sObjects and associated fields
            2. Accessing/updating the sObject records based on field names
            3. Getting SobjectType from ID
            4. Instantiating classes dynamically
          6. Writing better triggers
            1. Understanding the order of execution for triggers
            2. Writing triggers to handle bulk data
            3. Multiple triggers on an sObject
          7. Handling XML in Apex
          8. Handling JSON in Apex
          9. Packaging considerations with Apex
          10. API version
            1. Changing API versions
              1. Editing a class in your browser
              2. Editing a class in Force.com IDE (Eclipse)
          11. Apex testing tips
            1. Isolating test data from org data
            2. Testing with various profiles
            3. Letting your class know about the test context
          12. Apex REST web services
            1. API versioning with REST web services
          13. Knowing the limits
            1. Tracking resource (limit) usage
              1. Using Debug Logs in the Setup area
              2. Using the logging features of the Developer Console
        3. Summary
      15. 8. Writing Better Visualforce Code
        1. Knowing the Visualforce architecture
        2. Reusing the platform's native look and feel
          1. Starting the page design with native headers
          2. Native detail sections/forms
          3. Styling tables to look like native grids
          4. Printing messages in a native style
          5. Native (standard) versus custom controllers/extensions
        3. Reusing VF code
          1. Including other VF pages
          2. Defining templates or page layouts
          3. Defining your own components
        4. Limiting view states
          1. Use the view state inspector
            1. Using static when possible
          2. Trimming the view state by using transient variables
            1. Identifying a transient variable
          3. Avoid multiple forms
          4. Query-required fields only
          5. More tips and tricks on the view state
        5. Flexible pages using field sets
        6. Speeding up Ajax calls
          1. Using the immediate attribute
          2. Re-rendering required components only
          3. Demarcating using action regions
        7. Global variables and functions
        8. JavaScript remoting
          1. Public versus global – using the right access modifier
          2. Making the most out of the method arguments and return types
          3. Handling namespace prefixes in managed packages
            1. Approach 1
            2. Approach 2
        9. Taking care of security compliance in pages
          1. Encode/escape
          2. Enforcing CRUD and FLS
        10. Miscellaneous tips
          1. Querying a million rows
          2. Rendering a page as a PDF
          3. Dynamic VF components
          4. Charts
        11. Summary
      16. Index