Common, everyday use cases for AI

Aside from writing apex code, AI can be a helpful tool for Salesforce consultants.

Here are a few for your consideration:

Field labels
If you’re ever struggling to come up with a concise name for a field, AI can help.

For example, in a current project in which users complete a form, the answers need to be saved in fields.… Read the rest

Should you build a new flow or update an existing one?

As your Salesforce project evolves, you’ll eventually need to make enhancements. When it comes to flows, you have two options:

  1. Build a new flow to manage the new functionality
  2. Edit an existing flow and add the new functionality

Option 1 is a good choice if the change can be made in the existing flow without having to add any (or adding just a few) elements.… Read the rest

When building flows, think like a tester

If you’re a developer, you may be tempted to clean up apex code from time to time. This is because some other developers create what is called “spaghetti code”.

Spaghetti code is basically messy code that may work for a time, but incurs technical debt.… Read the rest

Here’s a flow naming convention for you

As with all things with labels, it’s a good idea to have a naming convention for your flows.

A proper convention allows you and your clients to find what they are looking for easily. It also makes things easier to support, and to create a sense of structure.… Read the rest

The basics of flow – naming conventions

Flows are a pivotal feature in Salesforce, and every good enough consultant needs to know how to use them effectively.

Let’s start with naming conventions. Each element in the flow needs a label. They should be clear, consistent, and concise. If more details are needed, place them in the description field.… Read the rest

Flow vs Omniscript: Which is better?

When building low-code automations in Salesforce, you have two options: Flow and Omniscript.

Flow was designed by Salesforce. As a result, more people are familiar with it. With nearly each release, it gets better and better, as more features are added.… Read the rest

Building flows: go down or go across?

Let’s say you design a subflow that attempts to find a contact. After several attempts, if a contact isn’t found, it creates one.

Each attempt tries to find a matching contact using different criterias. For example, find by

  1. Email address
  2. First and last name
  3. Last name and postal code/zip code
  4. Last name and birthdate

If attempt 1 doesn’t return any results, you move to attempt 2.… Read the rest

Does Salesforce perform a noop?

Here’s a question for you: When you update a field to its current value, what happens?

For example, let’s say you have a contact with a phone number of “123 456 7890”. Then you execute a flow that updates the phone number to “123 456 7890”.… Read the rest

Updating and deleting multiple records in a flow

Thanks again to everyone who responded to yesterday’s email about updating a record collection.

The most popular solution to test for > 0 records is to simply use a decision element with {Get_Contacts} Is Empty. This is simple and clean, and I’ll adopt this approach going forward.… Read the rest

How do you verify whether a record exists?

This email is more of a question than a comment. So I’m looking forward to your thoughts.

In flows, it’s common to verify whether a record exists before performing an action. For example, let’s say you need to update a contact if it exists, or create it if it doesn’t.… Read the rest

The somewhat useful “Update Existing Records” feature

In Salesforce flows, there’s a relatively new feature called “Update Existing Records”.

It’s only available in Create elements, and it allows you to update existing records instead of creating new ones. This effectively turns the create command into an upsert command.… Read the rest

You (probably) should learn how to program

I must admit, I’m using AI more and more these days. It helps me in numerous ways, but the majority of the time, it’s with development.

Gemini Pro is pretty good with apex coding. With a few prompts, it can create or edit code fairly easily and accurately.… Read the rest

Portable monitors are awesome

While I was on vacation recently, a friend of mine joined me. This was a remote location, and my friend had to work. So he brought his laptop.

But he also brought a portable monitor. I must have been living under a rock, because I never knew these things existed!… Read the rest

An easier way to build Salesforce packages

When building a Salesforce package, there are two ways to create and maintain them: 1GP and 2GP.

1GP uses a development org as the source of truth. Most consultants are very familiar with this way of working. You typically start in a DEV sandbox for development, then migrate changes to a UAT sandbox for testing, and finally to production.… Read the rest

Improving your soft skills

While it’s easy to say, “You should improve your soft skills”, what does that actually mean? How does one go about improving them?

Since soft skills are mostly about building relationships with others, we can then substitute the question to, “How can you build genuine relationships?”… Read the rest

Defining soft skills

Knowing the technical bits of Salesforce will only get you so far. And AI is eating up that space with each passing day.

So focusing on your soft skills is critical. In addition, they’ll separate you from your competition.

Let’s start by understanding what exactly are soft skills.… Read the rest

Where is Salesforce headed?

During my two week hiatus from these emails, I stopped talking and listened more.

One recurring theme in particular caught my attention: Salesforce is not the company it once was.

This theme presented itself in multiple ways:

  • People leaving the Salesforce ecosystem and moving to another career
  • Throngs of junior consultants who are out of work
  • Comments about how Salesforce is pushing Agentforce down our throats when most organizations are not even close to being ready to adopt it
  • With all the recent layoffs, the feeling of the “ohana” slowly dying

As I’ve said several times, our careers are based on a single platform.… Read the rest

Breaking up long logic

When designing long flows or apex, it may make sense to break things up.

One approach is to keep things modular. But then the question becomes, where to break up the logic?

Let’s say when A happens, do B, C, and D.… Read the rest

Using AI for first drafts

While AI may not be a full replacement of a good developer, it can still help in some instances.

Using the prompt, “Write a Salesforce LWC that allows users to edit a field”, Gemini Pro actually built a working lightning web component (LWC).… Read the rest

Using AI as an apex developer

You may not have known this, but in a previous life, I was a software developer.

It’s been years since I’ve developed, so I’m not an expert in apex. There are far too many awesome developers out there, and I lean on them for help.… Read the rest

What is data skew and how do you avoid it?

In Salesforce, building a future-looking data model is important. You generally want to anticipate issues before they occur.

One consideration that is overlooked is when a parent record has too many child records. Or when one user owns too many of the same records.… Read the rest

One-to-many relationships vs many-to-many relationships

Both Lookup fields and Master-Detail fields create a one-to-many relationship. This means the parent object can have multiple children. However a child cannot have multiple parents.

To allow the parent to have multiple children and the children to have multiple parents, a many-to-many relationship is needed.… Read the rest

Lookup fields vs Master-Details fields

When associating objects with each other, there are two main choices: Lookup fields vs Master-Details fields.

Here are some considerations for these two:

Master-Detail fields
These fields create a strong connection between two objects. The field is created on the “detail” object, and points to the “master” object.… Read the rest

Considerations when creating custom fields

One of the services I provide is technical debt assessment. I cannot tell you how many times I’ve been called in to help a client who is frustrated with their Salesforce implementation. I cannot tell you because the number is too damn high.… Read the rest

What to display on the home page

So you’ve rightly decided to have the home page as the 1st tab in your app. But what should be displayed on this page?

The out-of-the-box home page isn’t sexy at all. It’s a bunch of random widgets that are not usually related to your client’s needs.… Read the rest

Who’s on first? Deciding tab order

When preparing to create a new app in Salesforce, the first step is to determine your audience. Each app should have a specific audience in mind.

For small orgs, one or two apps may be sufficient. But for larger ones, you’ll probably want several.… Read the rest

Should you create a tab for a custom object?

Let’s cut to the chase. Just because you can create a tab for every custom object you create, doesn’t mean you should.

The question then becomes, when should you and when shouldn’t you? Here are some questions to help you answer that question.… Read the rest