Gesture Property

Version: Available or changed with runtime version 1.0.

Specifies a gesture that runs the action on a device with a touch interface, such as the phone client.

Applies to

  • Page Action
  • Page File Upload Action

Property value

ValueAvailable or changed withDescription
Noneruntime version 1.0No gesture for the action.
LeftSwiperuntime version 1.0Swipe in from the right edge of the touch interface.
RightSwiperuntime version 1.0Swipe in from the left edge of the touch interface.
ContextMenuruntime version 1.0The action has a context menu.

Syntax

Gesture = None;

Remarks

You typically use the Gesture property on list type pages for running an action on items in a repeater control.

Example

The following example shows how to use the ContextMenu value to make an action available through a context menu on mobile devices, rather than as a swipe gesture:

page 50100 "Customer List Enhanced"
{
    PageType = List;
    SourceTable = Customer;

    layout
    {
        area(Content)
        {
            repeater(Customers)
            {
                field("No."; Rec."No.")
                {
                    ApplicationArea = All;
                }
                field(Name; Rec.Name)
                {
                    ApplicationArea = All;
                }
            }
        }
    }

    actions
    {
        area(Processing)
        {
            action("Send Email")
            {
                ApplicationArea = All;
                Caption = 'Send Email';
                Image = Email;
                Scope = Repeater;
                Gesture = ContextMenu;  // Makes action available in context menu

                trigger OnAction()
                begin
                    // Email sending logic here
                end;
            }

            action("Create Sales Quote")
            {
                ApplicationArea = All;
                Caption = 'New Sales Quote';
                Image = NewSalesQuote;
                Scope = Repeater;
                Gesture = RightSwipe;  // Available as right swipe gesture

                trigger OnAction()
                begin
                    // Sales quote creation logic here
                end;
            }
        }
    }
}

In this example:

  • The "Send Email" action with Gesture = ContextMenu will be available through the context menu when users long-press or right-click on a customer record
  • The "Create Sales Quote" action with Gesture = RightSwipe will be available as a right swipe gesture on touch devices
  • Both actions have Scope = Repeater to make them available at the record level rather than the page level

Implementation Tips for Gestures
Introducing the Dynamics 365 Business Central Mobile App