Preface - Getting Started with SOQL (2014)

Getting Started with SOQL (2014)

Preface

SOQL plays a vital role in the development of Salesforce.com and administration tasks. As a developer or as an administrator in Salesforce.com, we write many SOQL statements to fetch and validate the data present in the objects. If we know all the features in SOQL, we can easily write optimized SOQL statements to filter the data and fetch the required data from the object.

The sample queries used in this book will help you to understand the SOQL features easily. In the first few chapters, the sample queries are intended for beginners and for developers or administrators who are new to Salesforce.com. In the rest of the chapters, the sample queries are intended for Salesforce.com experts. So, in the first part, simple queries are used, and in the next part, complex queries are used for an easier understanding of the SOQL features. Real-time examples are used as sample queries. These examples include querying data from a single object as well as querying data from multiple objects in a single query.

This book also addresses the standards and guidelines to be followed when writing SOQL statements. The standards and guidelines discussed in this book will help you to write SOQL statements without hitting any limitation set by Salesforce.com and to avoid unwanted data fetched through the queries.

The last chapter provides the installation procedures to be followed to install the software needed to execute SOQL statements. These software help us to get the real-time data from the objects for viewing. They also help you to execute the sample queries used in this book in each and every chapter simultaneously.

The most interesting part is the knowledge check at the end of each chapter. The knowledge check is a kind of assessment that grabs our attention and concentration and helps us to recollect the topics learnt in that chapter. It is also helpful for Salesforce.com certification preparation.

What this book covers

Chapter 1, Introduction to SOQL, shows what SOQL is and its purpose. While discussing its purpose, we will see where exactly we should use SOQL statements in Salesforce.com development and administration.

Chapter 2, Basic SOQL Statements, shows how to write basic SOQL statements in Salesforce.com. We will start with simple alias notation. We will try out many examples to differentiate objects using alias notation.

Chapter 3, Advanced SOQL Statements, shows how to query records from more than one object using relationship queries. The steps to get the relationship name among objects will also be provided.

Chapter 4, Functions in SOQL, shows all the functions that are available in SOQL. It discusses about the methods for translating the field values using toLabel(), which will be very useful when we want to translate the values and show them in a report.

Chapter 5, Limitations and Best Practices, shows the standards to be followed when writing SOQL statements. The best practice explained here allows us to retrieve the required records by filtering well. As a developer or as an administrator, we should follow these standards and best practices.

Chapter 6, Tools with Installation Guidelines, shows a few tools that are available to execute SOQL statements. The installation guidelines will also be discussed with step-by-step instructions.

What you need for this book

A basic knowledge in Salesforce.com CRM is a prerequisite to follow the examples in this book. A basic knowledge of SQL is an added advantage.

Who this book is for

This book is intended for Salesforce.com developers and administrators. Developers and administrators with a basic knowledge of Salesforce.com will find the material in this book accessible without additional preparation. Salesforce.com developers and administrators will find all the features that are available for writing SOQL statements.

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:

"Filtering a multiselect picklist field using the INCLUDES and EXCLUDES operators will be discussed in detail."

Any command-line input or output is written as follows:

SELECT Id, Name FROM Account

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: "The Objects link displays all the custom objects available in our organization."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.