Module 12: Updating a Record with an Object Action

In this module, you create another Object Action for the Expense Report object. The action allows the user to quickly change the status of the current expense report.

Step 1: Create the Object Action

  1. In Setup, select Build > Create > Objects and click the Expense Report link

  2. In the Buttons, Links, and Actions section, click New Action, and define the Action as follows:

    • Action Type: Update a Record
    • Standard Label Type: --None--
    • Label: Submit Report
    • Name: Submit_Report

  3. Click Save

  4. Drag the Status field to the Layout (after Expense Report Name), and click Save

Step 2: Create a Predefined Field Value

  1. In the Predefined Field Values section, click New

  2. Set the Status field value to Submitted

  3. Click Save

Step 3: Modify the Publisher Actions Layout

  1. In Setup, select Build > Create > Objects and click the Expense Report link

  2. In the Page Layouts section, click the Edit link to the left of Expense Report Layout

  3. Click Actions, drag the Submit Report action to the Publisher Actions section (after Add Expense), and click Save

Step 4: Test the Application

  1. Tap the menu icon (upper left corner)

  2. In the menu, tap Expense Reports under Recent

  3. Tap an expense report in the list

  4. Tap the publisher button (lower right corner)

  5. Tap Submit Report

  6. Notice that the status has been changed to Submitted. Tap the Submit button (upper right).

comments powered by Disqus