Sunday, December 22, 2024
5.6 C
London

Create Custom Button to Create an Account Record | All You Need to Know

It took me at least two hours to sort out the issue with this one, so I decided to share the blog with you to keep track of what I did  

The problem

I need to create a Custom Button and this button will work if Account Object has multiple Records With different Record Types, so on Button click new Account page with predefined Record Type will create so that we don’t need to select Record type first?

The Solution

  1. Go to Setup  
  2. Click Account  
  3. Click Buttons, Link, and Action 
  4. Click New button or link 

Label- New Account Record type 

Name-  New_Account_Record_Type 

Display type- Detail page Button  

Behavior- Display in new Window 

Content Source- URL 

/lightning/o/Account/new?useRecordTypeCheck=1&defaultFieldValues=AccountId={!Account.Id} 

This is the formula we need to use to complete this task. 

Click Save.  

Go to Page Layouts 

Account Layout 

Mobile & Lightning Actions  

Drag and drop the newly created button 

Check the appropriate field for our preconfigured Account Name!  

Let’s review our work with the formula: 

/lightning/o/Account/ – When generating an Account, the “regular” manner, this is a portion of a link. if it’s new, we want to make a new record. 

 Here the magic begins: useRecordTypeCheck=1. We are stating that in order to display the pick record type window, this “checkbox” needs to be true. 

 We want the AccountId field to be filled out even before we open the window with the Accounts fields, and by passing the Account Id of the record we are initiating the process, we can do this (from which Account record did we clicked New Account Record type). That’s all. 

Hot this week

How to Best Providing Dissertation Writing Services

7 Tips for Choosing the Right Dissertation Topic""Navigating the...

The Wedding Dresses: Finding Your Dream Gown

Choosing a wedding dress is one of the most...

Exploring Bangalore’s Real Estate Boom: A Guide to New and Upcoming Projects

Bangalore is a city that is renowned for its...

12 Ways Edge Servers Accelerate Limitless Growth

As new digital frontiers emerge, businesses pursue growth without...

Lab Grown Diamond Bracelets: The Epitome of Ethical Luxury

In the world of luxury accessories, lab grown diamond...

Topics

How to Best Providing Dissertation Writing Services

7 Tips for Choosing the Right Dissertation Topic""Navigating the...

The Wedding Dresses: Finding Your Dream Gown

Choosing a wedding dress is one of the most...

12 Ways Edge Servers Accelerate Limitless Growth

As new digital frontiers emerge, businesses pursue growth without...

Lab Grown Diamond Bracelets: The Epitome of Ethical Luxury

In the world of luxury accessories, lab grown diamond...

The Essential Guide to Choosing the Right Tax Consultant for Your UAE Business

Navigating the complexities of tax laws in the UAE...

How to Choose the Right Car Tinting Service in Dubai

Car tinting is not just about enhancing the appearance...

Related Articles

Popular Categories