Skip to content

Month: June 2024

Log your success (and failures)!

Frequently in Salesforce – we need to log something. Salesforce logs a lot of things for us automatically, out of the box, but when we build custom functionality using Apex or Flow, we should log these processes and store them for analysis later.

This can be very helpful for troubleshooting, analytics and compliance requirements.

In this blog, we’ll explore what to log, how to log, and look at what is required to ensure logging is scalable and follows industry best practice.

What should we log?

At a high level, we should always log events that may be helpful in understanding what exactly our automation is doing – especially if it fails!

  • General Application Errors
    Capture details of any exceptions or errors that occur within your application. This includes:

    Apex Errors: Log exceptions thrown in Apex classes and triggers.
    LWC Errors: Log exceptions that happen in JavaScript.
    Flow Faults: Log faults and errors that occur in Salesforce Flows.
  • Integration Results
    Log the success or failure of integrations with external systems. You should be able to see the results of each request and response in both inbound contexts and outbound contexts.

How should I log?

Salesforce provides logging functionality out of the box, but these are limited and shouldn’t be relied on for anything other than incidental, first-line debugging.

Some organisations decide to roll their own logging solution – while generally unadvisable, this approach can be useful in restricted environments where a third-party package cannot be used. In these instances, a custom-built solution might make sense.

However you decide to log, you should be logging in a structured format. This makes it easier to parse logs and feed them into analytics, which is really helpful for spotting trends or patterns within your logs.

You should also ensure you log the minimum required information to stay compliant with your local laws and regulations.

I always recommend the following package for logging in Salesforce, due to the excellent features and reduced effort versus building your own:

Nebula Logger

Scaling the Pyramid

This blog is an attempt to document my progress of climbing the mythical Salesforce architect pyramid and obtaining the technical architect certificate.

So far, I’ve achieved Application Architect.

I’m making good progress on the System Architect side of the pyramid – I’ve already achieved:

Platform Developer I
Integration Architect

So that just leaves:

Development Lifecycle and Deployment Architect (Targeting Dec 2024)
Identity and Access Management Architect (Targeting June 2025)


After that? Who knows. I don’t know if I’ll attempt the CTA. I’ll need a crazy amount of time and energy to even begin to prepare for CTA, and life might get in the way, but I love the idea of learning as much as possible no matter the result.

Hopefully that means we can learn some things along the way 😉