Custom List Button Setup
Prerequisites
To set up custom list buttons, you need the following permissions:
-
Minimum permissions for the FieldFX modules you are using
-
System permissions:
-
Customize Application
-
View Setup and Configuration
-
Basics
You can add custom buttons to related lists to extend standard functionality.
This powerful feature gives you the ability to add new records and pull in information from the related record.
Examples
-
You can add a New Service Job button to the Jobs related list on the Price Book object.
-
You can configure the button to pull in information from the price book and make the "AP" record type selected automatically for the job.
Adding a Custom List Button
Example: Adding a Custom List Button for Jobs
Description
In this example, we will add a New AP Job button to the Jobs related list on accounts and price books.
Feature Impact
Once we set up the New AP Job button, the following applies:
When you click the New AP Job button in a customer record, the following fields get completed automatically in the new job:
-
Name
-
Record Type
-
Customer
-
Notes
When you click the New AP Job button in an office record, the following fields get completed automatically in the new job:
-
Name
-
Record Type
-
Office
-
Notes
When you click the New AP Job button in a price book, the following fields get completed automatically in the new job:
-
Name
-
Record Type
-
Customer
-
Office
-
Segment
-
Notes
Setup Instructions
-
Add the Is Office field:
-
From Setup, enter "accounts" in the Quick Find box, then select Fields
-
Under Account Custom Fields & Relationships, click New
-
Select Formula
-
Click Next
-
In Field Label, enter "Is Office"
-
Under Formula Return Type, select Checkbox
-
Click Next
-
Enter the following formula:
RecordType.DeveloperName=="Office"
-
Click Next
-
Click Visible twice
-
Click Next
-
Select the page layouts on which to include the field
-
Click Save
-
Grant permissions for the field
-
-
Add the New AP Job button:
-
From Setup, enter "object" in the Quick Find box, then select Objects
-
Click Job
-
Under Buttons, Links, and Actions, click New Button or Link
-
In Label, type a name for the button
-
In Display Type, select List Button
-
In Behavior, select "Display in existing window with sidebar"
-
In Content Source, select "URL"
-
Enter the following URL:
/apex/FX5__JobEditor?EntityType=FX5__Job__c&RecordType=AP&FX5__Price_Book__c={!FX5__Price_Book__c.Id}&FX5__CustomerAccount__c={!IF(ISBLANK(Account.Id), FX5__Price_Book__c.FX5__AccountId__c, IF(Account.Is_Office__c, NULL, Account.Id))}&FX5__Office__c={!IF(ISBLANK(Account.Id), FX5__Price_Book__c.FX5__OfficeId__c, NULL)}&FX5__Segment__c={!FX5__Price_Book__c.FX5__Segment__c}&Name={!IF(ISBLANK(Account.Id), FX5__Price_Book__c.FX5__Account_Name__c, Account.Name)} Job {!TODAY()}&FX5__Notes__c=Enter your comments and observations here&retURL=%2F{!FX5__Price_Book__c.Id}&sfdc.override=1
-
Click Save
-
Click OK
-
-
Add the New AP Job button to customer page layouts:
-
From Setup, enter "accounts" in the Quick Find box, then select Page Layouts
-
Click Edit next to the page layout for customers
-
Move down to the Jobs (Customer) related list
-
Click the Wrench icon
-
Click + to expand the Buttons section
-
Under Custom Buttons, add "New AP Job" to the Selected Buttons list
-
Click OK
-
Click Save
-
Repeat steps a to h for other page layouts as needed
-
-
Add the New AP Job button to office page layouts:
-
From Setup, enter "accounts" in the Quick Find box, then select Page Layouts
-
Click Edit next to the page layout for offices
-
Move down to the Jobs (Office) related list
-
Click the Wrench icon
-
Click + to expand the Buttons section
-
Under Custom Buttons, add "New AP Job" to the Selected Buttons list
-
Click OK
-
Click Save
-
Repeat steps a to h for other page layouts as needed
-
-
Add the New AP Job button to price book page layouts:
-
From Setup, enter "object" in the Quick Find box, then select Objects
-
Click Price Book
-
Under Page Layouts, click Edit next to a page layout
-
Move down to the Jobs related list
-
Click the Wrench icon
-
Click + to expand the Buttons section
-
Under Custom Buttons, add "New AP Job" to the Selected Buttons list
-
Click OK
-
Click Save
-
Repeat steps c to i for other page layouts as needed
-