Custom List Button Setup
Introduction
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.
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
-
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.
Step-by-Step Guides
Add a Custom List Button
Example: Add a New AP Job Button to the Jobs related list
In this example, we will add a New AP Job button to the Jobs related list on accounts and price books.
Once we set up the New AP Job button, the following applies:
Record Type | Fields automatically added in the new job | ||
---|---|---|---|
|
|||
|
|||
|
Access Fields
-
Complete these sections in order:
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 and then click Next
-
In Field Label, enter "Is Office".
-
Under Formula Return Type, select Checkbox and click Next.
-
Enter the following formula:
RecordType.DeveloperName=="Office"
-
Click Next.
-
Click Visible twice and then click Next.
-
Select the page layouts on which to include the field and 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.
-
Complete the following:
Field Action Label
Type a name for the button.
Display Type
Select List Button.
Behavior
Select "Display in existing window with sidebar".
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.
-
Continue with adding the button to a customer page layout.
Add to Customer Page Layouts
See customer page layouts for more information.
-
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 these steps for other page layouts as needed.
-
Continue with adding the button to the office page layouts.
Add to Office Page Layouts
See office page layouts for more information.
-
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 these steps for other page layouts as needed.
-
Continue with adding the button to the price book page layouts.
Add to Price Book Page Layouts
See 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 these steps for other page layouts as needed.
Convert HTML to PDF Custom Button
If you have HTML files attached to a ticket, job, or a quote, you can convert them to a PDF. See Convert HTML to PDF Custom Button.