
Explore how to work with data in Apex, using S object and SQL queries, with 16 practice exercises, practical explanations, and appendix to reinforce concepts.
Amit Kumar, a senior Salesforce consultant with 12+ years in IT, is a trainer with expertise in C, C++, Java, and Android, and holds five Salesforce certifications.
Download the PDF resource for the practice exercises of this section.
Master how to retrieve data from Salesforce with SOQL, selecting fields from objects and related objects, and run queries via the developer console, VS Code, or Apex.
Explore how the where clause filters data in Apex queries using conditional expressions, with syntax select fields from object where condition and relational operators.
Master sql-like operators with a where clause, including and, or, in, not in, and like, and learn how null checks and case-insensitive like filters shape account and contact queries.
Use order by to retrieve data in a field’s specified order, with ascending default; apply limit to cap rows, and offset to skip records up to 2000 for batched results.
Explain relationship queries in Apex, covering child-to-parent and parent-to-child directions for standard and custom objects, using relationship fields, dot notation, and __r, plus subqueries and child relationship names.
Download the PDF resource for the practice exercises of this section.
Download the PDF resource for the solution of Practice Exercises - 1.
Download the PDF resource for the solution of Practice Exercises - 2.
Discover what's next after this course with the upcoming working with data in Apex part two, including SQL topics, query and object, and DML statements in API.
Are you preparing for a Salesforce Developer interview or looking to start your career as a Salesforce Developer? This beginner-level course is designed to help you master the basics of Apex programming and working with Salesforce data through SOQL and sObjects.
This course is Part 1 of the comprehensive "Working with Data in Apex" series, offering a perfect starting point for anyone who wants to understand how to interact with Salesforce data using Apex.
In this course, you’ll learn key concepts through theoretical explanations followed by detailed practical demonstrations, ensuring you gain the knowledge and hands-on skills needed to work with Salesforce data confidently. Along with the video lectures, each lesson provides helpful resources such as slides, screenshots of practical examples, and practice exercises to reinforce learning.
Who Is This Course For?
This course is perfect for:
Aspiring Salesforce Developers: Anyone who wants to kickstart their career in Salesforce development.
Salesforce Admins: Admins looking to enhance their skill set and transition into a development role.
Salesforce Developer Interview Prep: Those preparing for Salesforce developer interviews and looking to solidify their knowledge of Apex and SOQL.
Beginners in Apex Programming: Those with little to no prior experience in Apex but eager to learn how to interact with Salesforce data.
Topics Covered in This Course:
Using sObject: Understand the foundation of Salesforce records in Apex and how to use sObject to represent them.
Generic sObject: Learn how to work with generic sObjects to create flexible and dynamic code.
Accessing Fields: Discover the methods for accessing and modifying fields within sObjects.
Collection of sObjects: Explore how to work with collections (lists, sets, and maps) of sObjects in Apex.
Introduction to SOQL: Get introduced to SOQL (Salesforce Object Query Language) and how to query data from Salesforce.
WHERE Clause in SOQL: Filter results using the WHERE clause to target specific data in your queries.
Operators with WHERE Clause: Learn to use operators (=, !=, LIKE, IN) within your queries to refine search results.
ORDER BY, LIMIT, and OFFSET Clauses: Control the order and amount of data returned using these key clauses.
Date Literals for SOQL: Simplify date-based queries with Salesforce date literals like LAST_WEEK, THIS_MONTH, and more.
Relationship Queries: Learn how to perform queries on related Salesforce objects to retrieve parent-child and child-parent data.
What You Will Get from This Course:
Clear and Simple Explanations: Concepts are broken down into straightforward terms, making them easy to understand—even for absolute beginners.
Practical Demonstrations: Each concept is accompanied by practical, hands-on examples to show you how to apply it in real-world scenarios.
Practice Exercises: 16 practice exercises with solutions are provided to help you solidify your knowledge and test your understanding of the material.
Interview Preparation: Strengthen your knowledge for Salesforce Developer interviews with thorough explanations and practice questions.
Cautionary Tips: Learn the common pitfalls and important considerations when working with Salesforce data.
Course Resources:
Slides and Screenshots: Downloadable resources for each lesson include slides for revision and screenshots of practical implementations for easy review.
Practice Exercises: 16 exercises designed to help you apply the concepts learned in each lesson, with solutions for self-evaluation.
Pre-Requisites:
Before taking this course, it's recommended that you complete the Apex Programming Levels 1-5 (Part I) course series to build a solid foundation in Apex programming.
Course Outcomes:
By the end of this course, you will have a clear understanding of sObjects, SOQL basics, and how to manipulate Salesforce data through simple Apex programs. This knowledge will help you build a strong foundation in Salesforce development, and prepare you for more advanced topics in the "Working with Data in Apex" series (Part 2 and beyond).