Cooking with Code: A Sweet Intro to SOQL (Part Three)

I LIKE SOQLWelcome back to another episode of “Cooking with Code” where I introduce delectable bite-sized topics related to coding in Salesforce.

Today, we are concluding our satisfying sampler of Salesforce Object Query Language (SOQL) with Part Three of this three part series.

My first post introduced the basics of SOQL statements, including the following concepts and keywords: SELECT, FROM, LIMIT, ORDER BY, basic WHERE conditions, and basic operators. My second post showed how to pull data from related standard and custom objects.

In this, my third and final post, we will delve deeper still into: aggregates, how to work with dates and times, and using advanced operators with wildcards.

Ooooh wheee! This is going to be fun! Let’s have at it!

Cooking with Code: A Sweet Intro to SOQL (Part Two)

Working with Related Objects in SOQL.Welcome back to another episode of “Cooking with Code” where I introduce delectable bite-sized topics related to coding in Salesforce.

Today, we are continuing our satisfying sampler of SOQL with Part Two of this three part series.

My first post introduced the basics of SOQL statements, including these concepts and keywords: SELECT, FROM, LIMIT, ORDER BY, basic WHERE conditions, and basic operators.

This, my second post, will show how we can pull data from related standard and custom objects using dot notation and subqueries.

In my third and final post I will delve deeper still, into aggregates, advanced operators and wildcards, working with dates and numbers, and more advanced WHERE conditions.

So let’s dive in and build on what we’ve learnt about SOQL.

Cooking With Code: A Sweet Intro to SOQL (Part One)

SOQL is used to query Salesforce objects and return record setsWelcome back to another episode of “Cooking with Code” where I introduce delectable bite-sized topics related to coding in Salesforce.

Today we are getting into a sweet subject that I can’t wait to share with you! This is the first of three posts where together we’ll tackle the basics of SOQL, or Salesforce Object Query Language. SOQL is used to pull data sets from Salesforce and can be used in both Apex and Visualforce. Fantastic stuff for Salesforce Admins to learn, because we’re all Data Geeks at heart. (Data Nerds Unite!)

In this first post, I’ll introduce the basics of SOQL statements, including these concepts and keywords: SELECT, FROM, LIMIT, ORDER BY, basic WHERE conditions, and basic operators.

In my second post, we’ll move into pulling data from related standard and custom objects using dot notation and subqueries.

In my third post, we’ll dive deeper into aggregates, advanced operators and wildcards, working with dates and numbers, and more advanced WHERE conditions.

This is not an exhaustive (nor hopefully, exhausting) guide to SOQL. It’s just the bits and bobs that I use most often, and that should be enough to get you started.

Cooking With Code: Conditional Statements in Apex (and Java)

blog-conditional-IntroLately I’ve covered some pretty dense topics (SOQL, For Loops, Apex Collections), so I wanted to lighten up our code batter.

Today, we’ll tackle something on the more airy side and also something super fun to work with (and really handy for all Awesome Admins to know). Welcome to code kitchen, where we’ll whip up a batch of conditional statements!

Cooking with Code: Oh … for the Love of FOR Loops

For Loops in ApexNow that we’ve got our head around how to work with SOQL to pull data sets out of our Salesforce org, it’s time to circle back to loops.

In a previous post, we walked through While and Do-While Loops (and we learned to make Pavlova, which I seem to be obsessed with these days). I mentioned that there was another type of loop; a For loop. That’s the topic of today’s blog post; a fantastically flavor-filled foray into For loops.

I can’t wait to show you how this works. We are getting so close to a full-on trigger that I can almost taste it (salty and tangy … like really good salt and vinegar chips. Yum!).

UPDATE (5/15/15) – I have added a third best practice for using a SOQL For Loop.