Search code examples
formsaxaptadynamics-ax-2012

CTRL+N Not invoking new on a DetailsFormTransactions Page


I need CTRL+N to invoke the default behavior, that is to create a new record without invoking my NewButton.

NewRecordAction property is not filled out, the shortcut does nothing, seems to be disabled.

The DataSource on the form allows create, I can create through my NewButton MenuItemButton.

I seem to have lost it's default behavior somehow, what could cause that?


Solution

  • Ctrl-N does not do anything, because the NewRecordAction is not filled out and because there is not a command button with New in the Command property.

    I assume you have used "Create form from template" or have copied from the SysBPStyle_TransactionDetails form (same thing). This form contains a botton NewButton which is ment to call a creation form, like the SalesCreateOrder form.

    You have two options:

    1. Fill out the NewRecordAction with the control name of your create menu item. This should be mandatory in list pages.
    2. Delete the NewButton, then create a new command button with New in the Command property. Also remember to assign a value to the DataSource property on the control or a containing node.

    I personally prefer the second option (maybe combined with a setFocus call) because a create form is then not needed and there is only one form for you to maintain and the user to learn.