Salesforce

How Do I Set a Default Push Button for the Form? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Set a Default Push Button for the Form? (Magic xpa 4.x)

If you have several buttons on a form, you may want to designate one of them to be the default that is pressed when the user presses Enter.

For example, on this screen, we have the Close button selected by default. Although the cursor is positioned on Customer ID when the window opens, pressing Enter will cause the task to close.

Here is how you do it.

Setting a Default Push Button

  1. Create your push button, and give it a control name.

  2. Go to Form Properties (Alt+Enter when no control is selected).

  3. In the Input section, go to the Default Button property.

  4. Zoom from the first field to select your button control name.

  5. Or, zoom from the expression area to the right to create an expression that, at runtime, evaluates to a valid button control name.

Now, when you run your program, the button you chose will be the default button.

See also

The Online and Rich Client Samples projects (program TS27 and RTS27)

Reference
Attachment 
Attachment