Salesforce Admin Quick Tips

Salesforce Quick Tip – How to Make an Out of the Box Record Update Modal Popup

2 min read

Subscribe on YouTube

Why This Is Useful

Every so often somebody asks for a button that pops open a small modal showing just the handful of fields a user actually needs to update. Usually because the record page has 147 fields on it and finding the three that matter is a chore.

The instinct is to reach for a Lightning Web Component. Don’t. There’s a completely out of the box way to do this and it takes about two minutes.


Step 1: Create The Quick Action

1. Setup → Object Manager, pick your object (Account here).
2. Buttons, Links, and Actions → New Action.
3. Action Type: Update a Record.
4. Standard Label Type: leave it as None, or pick one if it fits.
5. Give it a Label, something like Update Account Rating.
6. Save.


Step 2: Pick The Fields

Saving drops you into a mini page layout editor. Salesforce prefills it with some default fields you almost certainly don’t want.

Remove all of them, then drag in only the fields you actually need. That’s the whole point of the exercise, so be ruthless. If it’s a rating update button, that’s one field.

Quick Save.


Step 3: Put It On The Page

1. In Object Manager go to Page Layouts and open whichever one is your default.
2. Click Mobile & Lightning Actions in the palette.
3. Find your new action and drag it into the Salesforce Mobile and Lightning Experience Actions section.
4. Quick Save.

Refresh a record and there’s your button. Click it, a modal pops up with exactly the fields you chose, hit Save, and the record updates in place. No page reload, no navigating away.


Why Bother When You Could Build A Component?

Because this version comes with a pile of things for free that you’d otherwise have to build and maintain:

1. Field level security is respected automatically.
2. Validation rules fire exactly as they should.
3. Triggers and flows run normally.
4. It works on mobile without you doing anything.
5. It’s accessible out of the box.
6. There is no code to test, which on a platform demanding 75% coverage is not nothing.

An LWC version of this is maybe eighty lines of JavaScript plus an Apex controller plus a test class, and you’d have to get all six of those things right yourself.

Reach for code when clicks genuinely can’t do it. This is not one of those times.


Bonus

Pair this with Dynamic Actions and you can make the button appear only when it’s relevant. An “Escalate Case” button that only shows on cases that can actually be escalated is a small thing that users genuinely notice.

Full docs on object specific quick actions here.


Get Coding With The Force Merch!!

We now have a redbubble store setup so you can buy cool Coding With The Force merchandise! Please check it out! Every purchase goes to supporting the blog and YouTube channel.

Get Shirts Here!
Get Cups, Artwork, Coffee Cups, Bags, Masks and more here!


Check Out More Coding With The Force Stuff!

If you liked this post make sure to follow us on all our social media outlets to stay as up to date as possible with everything!

Youtube
Patreon
Github
Facebook
Twitter
Instagram


Salesforce Development Books I Recommend

Advanced Apex Programming
Salesforce Lightning Platform Enterprise Architecture
Mastering Salesforce DevOps

Good Non-SF Specific Development Books:

Clean Code
Clean Architecture