Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to: Create a New Record When a Form Opens [AX 2012]

Updated: May 25, 2011

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

To create a new record every time that the user opens a form:

  • Call the create method on the form data source.

  • Set the InsertAtEnd property on the form data source to No.

  • Set the StartPosition property on the form data source (to First or Last).

The following example is from the run method in the PurchCreateOrder form. purchTable_ds is the variable for the PurchTable data source on the form.

void run()

    if (!purchTableType)
        throw Exception::Error;

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.

Community Additions

© 2015 Microsoft