Series: The Lightning Experience. Part 2: What to do with those URL & Javascript buttons?

As I was learning Salesforce.com, I asked what would be a good skill to develop, to which the answer was custom buttons. I have to say, I’ve built some pretty awesome buttons in Classic version of Salesforce. Alas, both URL hacks and javascript are not supported in Lightning. So, as you prepare your org to move over to the Lightning interface this may be something that needs solving. According to this Trailhead, suggested solutions include Quick Actions, Triggers, Lightning Actions, or Visualforce actions and buttons. Below is an example of an easy switch from URL hack to Quick Action.

Quick Action in Lightning

Use Case: Current URL button opens an Opportunity edit screen with pre-populated fields.

Lightning Solution: Create a Quick Action.

Old URL Button example

Old URL button example

Create a Quick Action

Go to setup menu > Object Manager > Account > Buttons, Links and Actions

New Action

Set Record Type & Label

Add fields to "Edit Layout"

Add fields

Set predefined values

predefine values

Add to Lightning Experience Actions on the Account Page Layout

Verify it’s on the Account Record Page

Click Action from top of page

Once clicked, a pop-up with those fields pre-defined appear.

Example of pop up with pre defined values from the Account page

Recent Posts
Archive