Advanced Apex Programming 5th Edition now Available

I’m pleased to announce the immediate availability of the fifth edition of Advanced Apex Programming!

I know what you’re thinking – what has changed? Do I really need a new edition?

Well, the first thing you should know, is that this book is over 60 pages longer than the previous edition – but that alone does not convey the scope of the changes.

Here’s a brief summary of the major changes for this edition:

Chapter 3: New coverage of the Salesforce platform cache and query selectivity limits.

Chapter 4: Extended to include additional bulk design patterns in the context of enforcing data integrity and addressing data skew.

Chapter 6: This chapter has been completely rewritten with all new examples to incorporate new technologies and modern approaches for refactoring application functionality into decoupled applications or packages.

Chapter 7: The chapter and examples have been rewritten to address batch apex exception events and queueable transaction finalizers. Other new topics include the challenge of dealing with transactions in the context of callouts, suicide scheduling and change data capture.

Chapter 9: The section on working with custom metadata has been completely rewritten to reflect improvements in the technology. The Aura sample code has been reimplemented as Lightning web components.

Chapter 10: The chapter and examples have been updated to be based on the new trigger examples in chapter 6.

Chapter 12: Revised recommendations for unit tests and managed packages.

So even if you don’t buy this new edition, please don’t read the previous one – the platform has changed, and many of the earlier recommendations no longer reflect best practices. Especially when it comes to trigger design patterns!

By the way – the Kindle edition is still priced considerably lower than the print edition – so that offers an inexpensive way to check out what’s new without buying a new printed book, for those of you who are more cost sensitive (I do recommend the printed book in general though, as listings just don’t come through that well in the eBook editions).

As always, watch for corrections and updates here on advancedapex.com – as I’m quite sure Salesforce will continue to update the platform faster than I can revise the book 🙂

The Dreamforce Dilemma and the Future of Conferences

Though it’s still April, I’ve already begun to hear people ask the question that is on many minds – will Dreamforce happen this year?

Personally, it’s hard to see how it can, at least in it’s usual form – it’s hard to imagine that in November it will make sense to bring in 170,000 people from all over the world and place them in close proximity (and you know how close people crowd together during Dreamforce). Given the values of Salesforce and our Ohana to not put people’s lives at risk, and the science driven decision making by our state and local governments that is perhaps less susceptible to emotional, irrational and political pressure than seems to be the case with other states, it would take a medical miracle. Such a miracle could happen – we are talking six months from now. But even as we hope for such a miracle, creating some backup plans would seem prudent.

So what might such backup plans look like? I’m sure the folks at Salesforce are asking themselves “how do we translate the Dreamforce experience into a virtual experience?” Along the way, I am sure they will look at best practices from other conferences that have gone virtual.

But I think this is also an opportunity. There is a real need to reinvent virtual conferences beyond a series of video-conferencing calls and webinars. And I think Salesforce is the right company to pioneer this. I’m going to share some thoughts – I doubt they could be implemented by November, but perhaps early steps can be taken.

The challenge with virtual conferences is that we’re all tired of sitting in front of screens and watching things. Besides, a conference isn’t just about watching sessions – it’s about exploring, and connecting with peers, customers and vendors. It’s about engaging – a conference is not a passive activity.

If only there were a way to make a virtual experience that is as engaging – or even more engaging – than a physical conference….

Oh wait – there is one… A virtual experience so engaging that tens, maybe hundreds of millions of people experience it every day. One so compelling that it’s often hard to leave. And one that generates billions of dollars of revenue ever year.

(more…)

Advanced Apex Programming 4th Edition now Available

I’m pleased to announce the immediate availability of the fourth edition of Advanced Apex Programming!

I know what you’re thinking – what has changed? Do I really need a new edition?

Well, the first thing you should know, is that this book is about 20% larger than the previous edition. But, the price is the same – instead of increasing the page count, I was able to increase the page size – from 6 x 9 to 7.5 x 9.25.

And what’s in that 20%?

Here’s a brief summary of the major changes for this edition:

Chapter 2: The section on “Controlling Program Flow” has been largely rewritten with a new example.

Chapter 3: The sections on “CPU Time Limits”, “Benchmarking”, “24-hour Limits” and “Other Platform Limits” are new or have been rewritten.

Chapter 5: There’s a new discussion on detecting duplicate fields in dynamic SOQL queries.

Chapter 6: The trigger framework has been enhanced, with particular attention to handling record DML updates across multiple trigger handlers (a subject discussed in previous editions but not actually demonstrated).

Chapter 7: New coverage of platform events.

Chapter 9 is a completely new topic: Application configuration. The previous chapters 9-12 are now chapter 10-13 and the following paragraphs refer to them by their new chapter number.

Chapter 10: Additional discussion of platform events.

Chapter 11: Revised recommendations for unit tests and managed packages.

Chapter 13: Updated for Salesforce DX

So even if you don’t buy this new edition, please don’t read the previous one – the platform has changed, and many of the earlier recommendations no longer reflect best practices.

And by the way – the Kindle edition is still priced considerably lower than the print edition – so that offers an inexpensive way to check out what’s new without buying a new printed book, for those of you who are more cost sensitive (I do recommend the printed book in general though, as listings just don’t come through that well in the eBook editions).

As always, watch for corrections and updates here on advancedapex.com – as I’m quite sure Salesforce will continue to update the platform faster than I can revise the book 🙂

New Course – Formula Fundamentals in Salesforce

Every admin and developer in the Salesforce world uses formulas – they are everywhere. And everyone learns them – sort-of. People tend to pick things up along the way, tweaking an existing formula here, reading the online docs there, borrowing from an online source – everywhere.

As a result, even experienced admins and developers tend to have holes in their knowledge – a less than complete understanding of data types, or of formula limits – or, and don’t get me started – endless confusion when it comes to logical operators (And, or, Not – you now – the ones that cause most formula bugs).

In my latest course, Formula Fundamentals in Salesforce, you’ll go back to the basics with in-depth coverage of Salesforce formulas. You’ll learn about data types, operators and functions – limits and testing. And yes, those dreaded logical operators and how to translate human logic into formula logic, and then validate that you did it correctly and test your work.

Watch Formula Fundamentals in Salesforce on Pluralsight

Updating Related Records in Apex

One of the more interesting challenges in Salesforce has to do with updating related records. For example: If you change the owner of an account, you might want to change the owner of all contacts for the account, and then maybe change the related tasks for those contacts and so on.

While there is some support some some situations (such as changing a single account owner using the UI), the general problem of doing so in bulk is actually quite challenging, as the number of related records that need to be updated can be huge.

If you’re interested in digging deeper into this subject, check out my new course on Pluralsight – “Play by Play: Managing Data in Salesforce using Apex“.

Play by play courses are a bit different than most. Instead of watching me present a screen cast, you’ll watch a video where I sit down with Don Robins and build out a solution in real-time. You get to see the entire development process, including the creation and resolution of bugs along the way. You’ll watch as I implement several different approaches, including some common ones that have hidden flaws that might not appear until long after they are “successfully” deployed.

As always, you can easily sign up for a free Pluralsight trail to watch the course if you aren’t currently a subscriber.

Watch Updating Related Records in Apex on Pluralsight

TrailheadX Agenda Surprises

Update – The real TrailheadX agenda is now posted https://developer.salesforce.com/trailheadx/agenda. If you’re attending be sure to stop by the Campfire Tales session being put on by Pluraslight on Wednesday at 12:40!

Like everyone else, I await the official agenda for TrailheadX – the first Salesforce developer conference.

However, being as impatient as I am, I did some digging (through my imagination) and came up with a short list of some of the amazing experiences we can look forward to. Here they are:

  • Everyone will get loaded onto RVs for learning on the road with Jeff Douglas @jeffdonthemic – learning coding while driving through California’s beautiful state and national parks.
  • You’ll then practice your skills on tablets as naturalists guide you on a nature trail as part of the innovative Trailhead on Trailheads program.
  • TrailheadX takes place on the same day as the California primary. Donald Trump will lead a hands on training of implementing wall management on Salesforce platform using advanced currency management (since it’s going to be paid for in pesos) assuming he can get currency management to work (See here ).
  • A Benjamin Franklin lookalike will demonstrate building a mobile electrical system management app built on Lightning.
  • As part of our commitment to community service we’ll be reaching out to the homeless – the thousands of San Francisco tech workers who struggle to afford a bed in a hacker dorm while only making six figures.
  • Featured performance by Adele singing her hit song “Hello World”