Create a quick action in your mobile applications

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 3 minutes to read
  • Provide easy access to an important item by creating a quick action. For example, you can create a quick action that opens a Service Catalog item.

    Before you begin

    Role required: admin

    Procedure

    1. Create a function for the quick action.
      1. Navigate to System Mobile > Functions.
        The Function [sys_sg_button] table opens.
      2. Click New.
      3. On the form, fill in the fields.
        Table 1. Button fields form
        Field Description
        Name Name of the function record.
        Description Description to enable other users to easily understand the purpose of the function.
        Type

        Type of quick action that you want to create.

        To create a quick action that opens a Service Catalog item, select URL.

        For more information about function types, see Configure a smart button.
        Context Whether the function applies at the record or table level.
        • Record: Action only applies at the record level. For example, updating a field.
        • Global: Action that only applies at the table level. For example, creating or deleting a record.
        For this example, select Global.
        Link Label Label for the link. This value does not display in the user interface.
        Link URL

        Relative URL for the item that you want to open when the user clicks the function. For example, to open a Service Catalog item in the Now Mobile portal, enter /mesp?id=sc_cat_item&sys_id=060f3afa3731300054b6a3549dbe5d3e.

        This field only displays if the Type field is URL.

        Relative URL

        Option that is selected to determine whether the URL is relative. For this example, choose Selected.

        This field only displays if the Type field is URL.

        Condition
        Table Table on which the condition runs.
        Condition Condition that should be met for the action to be successful. For a catalog item, enter var item = new sn_sc.CatItem('3f1dd0320a0a0b99000a53f7604a2ef9'); answer = item.canView() && item.isVisibleServicePortal(); to display the quick action only when the end user has permissions to view the item.
        Roles Roles that you want to user to have to view the quick action.
    2. Add an instance of the function that you created to the page.
      1. In the native UI, navigate to Now Mobile App > Applet Launchers.
      2. Open the applet launcher record that you would like to add the quick action to.
      3. Select the Body tab.
      4. Insert a new row in the Quick Actions Menu Maps related list.
        If you're not able to insert a row, make sure that you're in the ServiceNow Now Mobile App Screens and Applet Launcher application scope.
      5. Click the magnifying glass to look up an item
        The Function Instances [sys_sg_button_instance] table opens.
      6. Click New.
      7. On the form, fill in the fields.
        Table 2. Function instance form
        Field Description
        Name Name of the function instance.
        Description Description to enable other users to easily understand the purpose of the function instance.
        Parent Page on which you are adding the quick action. For example, select Applet Launcher: Homepage to add the quick action to the home page. Select a value in the Parent table field first.
        Application Application scope.
        Parent table Table that contains the record type where the button appears. For this example, select applet Launcher [sys_sg_applet_launcher] to add the quick action to an applet launcher page.
        Function Function record that you created earlier.
        Label Label to help the user understand what the quick action opens. For example, Report an outage.
        Location Location where the button appears in the UI. For this example, select Quick Action.
        Icon Icon to display next to the label. For more details on mobile icons, see Mobile icons.
        Note:
        Not all listed icons work with quick actions. To see a list of compatible icons, filter your list where the Icons field contains now-mobile-icons-buttons.
        Note:
        The Icons field is not on the icon list by default. To add the Icon field to your list, right-click the list header and select Configure > List Layout. Then, add the Icon field to the selected list. You should see the icon field on your reference field list.
        Order Number that indicates the order that the functions are listed. If there are multiple instances in the same location, the app displays them from the lowest to the highest.
      8. Click Submit.
      9. Save the applet launcher record.

    Result

    Your users can open the quick action by selecting the Plus icon icon on the applet launcher page.