System administrators can create new actions, buttons, or links and add them to a record's Page Layout. Buttons and links help integrate Salesforce data with external URLs, applications, custom code, a Visualforce page, or other back-end office systems.

Actions let users perform tasks, such as create records. You can also override the default action of some standard buttons and customize the behavior of tab home pages to suit your org’s needs.

Creating New Button for a Page Layout

The steps below provide an example of how to create a custom Customer Receipt button and add it to the Receipts page layout. This button will allow users to view the current receipt record. You can modify the below steps based on the button you’d like to create.

How to Add a Customer Receipt Button to a Receipts Page Layouts

  1. Navigate to the eBusiness App > Receipt and search for a record. For this example, the Receipt 0000000000 record is selected.
  2. Click the Lightning Gear button and click Edit Object. A new tab will open to the Receipt object in the Object Manager in Setup.
  3. Click Buttons,  Links, and Actions from the left-side menu.

  4. Click the New Button  or Link button in the upper right-hand corner. The New Button or Link creation page will open.
  5. From the New Button or Link creation page, enter the following settings to create the specific Customer Receipt button:

    1. Enter “Customer Receipt” in the Label field and press the tab key on your keyboard to auto-populate the Name field below.
    2. Enter any optional text in the Description field.
    3. Select the Detail Page Button in the Display Type section.
    4. Select Display in existing window without sidebar or header in the Behavior section.
    5. Select URL as the Content Source.
    6.  In the Text Area, enter the redirect URL for the custom page as follows: /apex/{!$Setup.OrderApi__App_Config__c.OrderApi__Namespace_Prefix__c}receipt?id={!OrderApi__Receipt__c.Id}


      The Selected Field Type, Insert Field, Insert Operator, Functions, and Check Syntax fields and buttons can be used to add desired attributes for your own custom button action to the text area.

  6. Once the URL text is added, click the Preview button at the top of the window to preview your button.
  7. If you're satisfied with your button, click Save. This button will now be available to add to the Page Layout for the Receipt Object.

To add the new button to the Receipt Object’s Page Layout:

  1.  Return to Receipt 0000000000.
  2. Click the Lightning Gear button and [Click] Edit Object. A new tab will open to the Receipt object in the Object Manager in Setup.
  3. Click Page Layouts from the left-side menu.
  4. Select the most recent layout for your object. The page layout will open.

  5. From the left column of the Receipt Layout – Master page, click Buttons to display the available buttons. Verify Customer Receipt button is available.
  6. Scroll-down on the page until you see the Receipt Detail and Custom Buttons section.
  7. Drag-&-Drop the Customer Receipt button to the Custom Buttons section.
  8. Click Save. The new Customer Receipt button will be added to the desired record's page layout. Click the Customer Receipt button to view the current receipt record.