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

  1. You can add a New Service Job button to the Jobs related list on the Price Book object.

  2. 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

  1. Access FieldFX Back Office

  2. Switch to Salesforce Classic

  3. Add the Is Office field:

    1. From Setup, enter "accounts" in the Quick Find box, then select Fields

    2. Under Account Custom Fields & Relationships, click New

    3. Select Formula

    4. Click Next

    5. In Field Label, enter "Is Office"

    6. Under Formula Return Type, select Checkbox

    7. Click Next

    8. Enter the following formula:

      RecordType.DeveloperName=="Office"
    9. Click Next

    10. Click Visible twice

    11. Click Next

    12. Select the page layouts on which to include the field

    13. Click Save

    14. Grant permissions for the field

  4. Add the New AP Job button:

    1. From Setup, enter "object" in the Quick Find box, then select Objects

    2. Click Job

    3. Under Buttons, Links, and Actions, click New Button or Link

    4. In Label, type a name for the button

    5. In Display Type, select List Button

    6. In Behavior, select "Display in existing window with sidebar"

    7. In Content Source, select "URL"

    8. 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
    9. Click Save

    10. Click OK

  5. Add the New AP Job button to customer page layouts:

    1. From Setup, enter "accounts" in the Quick Find box, then select Page Layouts

    2. Click Edit next to the page layout for customers

    3. Move down to the Jobs (Customer) related list

    4. Click the Wrench icon

    5. Click + to expand the Buttons section

    6. Under Custom Buttons, add "New AP Job" to the Selected Buttons list

    7. Click OK

    8. Click Save

    9. Repeat steps a to h for other page layouts as needed

  6. Add the New AP Job button to office page layouts:

    1. From Setup, enter "accounts" in the Quick Find box, then select Page Layouts

    2. Click Edit next to the page layout for offices

    3. Move down to the Jobs (Office) related list

    4. Click the Wrench icon

    5. Click + to expand the Buttons section

    6. Under Custom Buttons, add "New AP Job" to the Selected Buttons list

    7. Click OK

    8. Click Save

    9. Repeat steps a to h for other page layouts as needed

  7. Add the New AP Job button to price book page layouts:

    1. From Setup, enter "object" in the Quick Find box, then select Objects

    2. Click Price Book

    3. Under Page Layouts, click Edit next to a page layout

    4. Move down to the Jobs related list

    5. Click the Wrench icon

    6. Click + to expand the Buttons section

    7. Under Custom Buttons, add "New AP Job" to the Selected Buttons list

    8. Click OK

    9. Click Save

    10. Repeat steps c to i for other page layouts as needed