Cooking with Code: Yummy Apex Utility Classes

Apex Utility ClassesWelcome back to Cooking with Code. Today we are going to take a deeper dive into the ins and outs of apex classes.

We looked at this in my intro to Object Oriented Programming (OOP) post, but today we’re going to go over what are commonly called Utility Classes. I know, right?! Who doesn’t love a little utility in their lives?

Continue Reading

Cooking with Code: A Tasty Trigger Treat (Apex Triggers)

blog-triggers-woahWell! Here we are … facing one of the “big topics” in Apex coding. I have to say that I’m pretty darn excited (and yes, it’s true, I am easily excited). We’re finally getting to run some actual code … like … for realz!  It’s Apex trigger time!

Today, in Cooking with Code, we’re going to tackle the triggers. I think you’ll be amazed to see how that, for all the hype, they aren’t all that complicated. Really, you’ve done most of the hard stuff.

Continue Reading

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!

Continue Reading

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.

Continue Reading

Cooking with Code: A Satisfying Introduction to Apex sObjects

Working with sObjects in ApexWelcome back to Cooking with Code (CWC), where today you’ll enter a place that should feel pretty familiar to my fellow Awesome Admins (can I get a “hell yeah!”?).

I’m talking about working with records in Salesforce objects (e.g., Accounts, Contacts, Opportunities). When we work with these in Apex, we have a fancy new way to talk about them, as sObjects.

Continue Reading

Cooking with Code: Mix until combined (or using While and Do-While loops in Apex & Java)

Loops are like a recipe instruction of "Mix until combined."

Welcome back to another episode of Cooking With Code, where I tempt you with food-inspired introductions to Object-Oriented Programming (OOP) concepts.

In previous posts, you’ve learned that Apex and Java, like other OOP languages, have basic building blocks or tools to help us program. Examples include: classes, objects, methods, and variables (both primitive and collections).

Continue Reading

Cooking with Code: Amuse-bouche* of Apex Collections (Lists, Sets, and Maps)

Orchard with apples

In my last blog post, I wrote about variables, and in particular, primitives. Today I’m going to expand on variables and talk about the oh-so-powerful idea of “collections.”

Unlike Java, which only has one type of collection (Arrays, also know as a Lists), Apex has three to choose from: Lists, Sets, and Maps. Together, we’ll go into each of these types of collections and show you what they are best used for, and how to use them when you start coding.

Continue Reading

Cooking with Code: Primitive Data Types in Apex and Java

Cooking with Code: Introducing primitive data types in Apex and JavaThinking about variables makes me hungry. That might be taking things a little far, but I’ve been preoccupied with cooking and coding recently, so they seem to be merging in my mind.  I think this stuff can be fun, and for me, silly analogies make it all easier to understand. Hopefully by the end of this post you’ll agree!

Continue Reading

Elevation Gain: A review of Salesforce Trailhead

12,120 Trailhead PointsI completed the available Salesforce Trailhead modules last Friday with mixed feelings. I’m really pleased to have checked all the boxes and gained all the badges, but I’m more than a little sad that I’m done (for now).

I wanted to give back some love to the Salesforce Developer Relations group by writing a review.  You can probably guess that I loved it, but I hope to say more on why, and better yet, get you to check it out for yourself. Plus some tips on how to best use the tool, and advice on what you might want to skip over if you’re short on time.

Continue Reading

Never give up! Never Surrender! (or how perseverance is important in Apex [or any] coding)

Fabulous New Salesforce Trailhead Badges!I am totally and utterly thrilled to announce that I have written Apex and it worked! It actually did what I meant it to do! Thanks to Salesforce Trailhead, I have achieved a major goal and written my first Apex trigger. Phew! What I high I have.

I have to say, that the biggest lesson from my experience with CFML coding (ColdFusion Markup Language), is to persevere and never give up on finding the answer.  It’s such a huge deal in my mind, and an absolute must for anybody wanting to get into coding (which is so darn picky about every little keystroke), that I wanted to blog about it.

Continue Reading