Bojensen Blogs

open form with new record – Microsoft Dynamics AX / Axapta

Set the “EnumTypeParameter” on the form menuitem to FormOpenMode
allows you to to set this via the menu Item then check for it once you open the form, this way if you open the form from diffrent locations you can check to see if the parameter is set to "ForNew" and if it is then you can open with a new record.

here is the code I used to get the for to open with a new record. In the Run Method of the Form I put

public void run() { ; super(); if (SysListPageHelper::isFormOpenedWithOpenModeForNewParm( element)) { emplTable_ds.create(); } }

Also remember to

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

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

open form with new record – Microsoft Dynamics AX / Axapta – Technical Forum – Dynamics User Group

Comments are closed.