Salesforce関連の記事を書いています。

  1. Salesforce

How to create custom buttons for each record type

For example, when trying to create a new business meeting record, you sometimes find it tedious to select multiple record types from the modal display. In such cases, you can save your users some time by providing a custom button for each record type on the list page. In this article, we will explain how to set this up.

Creating a custom button to display a specified record type

When creating a custom button to display the registration screen for a specified record type, it is necessary to specify the record type ID in the code. The following is an explanation of how to create a custom button to display the registration screen for a specified record type.

1] Creating a custom button

Open a business meeting object and click “Edit Object” from the gear mark in the upper right corner of the screen.

Click “Buttons, Links, and Actions” from the menu on the left.

Click the “New Button or Link” button in the upper right corner of the screen.

Enter or select the code in the red frame in the figure below.

Please write the code as shown below.

Sample
/lightning/o/Opportunity/new?recordTypeId=012xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&defaultFieldValues= 
Name=Opportunityname

recordTypeId=012xxxxxxxxxxxxxxxxxxxxxx

The second line, “Name,” should be entered if there is a value you want to input as a default field. If there is no default value to be entered, it is not necessary. In that case, the following description is OK.

Sample
/lightning/o/Opportunity/new?recordTypeId=012xxxxxxxxxxxxxxxxxxxxxxxxxxx&defaultFieldValues

Save and move on to the next task.

Next, click on “List View Button Layout” from the menu on the left. Click the down arrow on the right side of “List View” and click “Edit.

Click on the “Record Type 1” that you just created in the “Available Buttons” on the left side, and click on the right arrow button to move it to “Selected Buttons” and save it.

Go back to the list view of the business meeting and “refresh” the page. A custom button for “Record Type 1” will now appear in the upper right corner of the screen.

If you have multiple record types, you can repeat this process to display a custom button for each record type as shown below.

Clicking the button for record type 1 will display the registration screen with “record type 1” applied.

How was it? It is a small thing, but this kind of efficiency is important in a work that is repeated many times. We hope this will be helpful.

Salesforce recent post

  1. How to create custom buttons for each record …

  2. What are Salesforce input rules? Explanation …

  3. You must be using Office365 (Microsoft365) to…

  4. How to loop a specified number of times in a …

  5. How to create an item that only the record ow…

関連記事

PAGE TOP