Tuesday 30 September 2014

Sequence of methods in the FORM level in AX




Sequence of methods in the FORM level in AX




This gives the information of method calls in the form level while

       1. Opening the Form.
       2. Creating/Updating/Deleting the record in the Form.
       3. Closing the Form.

Sequence of Methods calls while opening the Form

          Form --- init ()
          Form --- Datasource --- init ()
          Form --- run ()
          Form --- Datasource --- execute Query ()
          Form --- Datasource --- active ()

Sequence of Methods calls while closing the Form

         Form --- canClose ()
         Form --- close ()

Sequence of Methods calls while creating the record in the Form

        Form --- Datasource --- create ()
        Form --- Datasource --- initValue ()
        Table --- initValue ()
        Form --- Datasource --- active ()

Sequence of Method calls while saving the record in the Form

           Form --- Datasource --- ValidateWrite ()
          Table --- ValidateWrite ()
          Form --- Datasource --- write ()
          Table --- insert ()

Sequence of Method calls while deleting the record in the Form

            Form --- Datasource --- validatedelete ()
            Table --- validatedelete ()
            Table --- delete ()
            Form --- Datasource --- active ()

Sequence of Methods calls while modifying the fields in the Form

          Table --- validateField ()
          Table --- modifiedField ()

Friday 19 September 2014

What is a Dialog in Ax 2012?




                                                                 Dialogs

  • Dialogs should allow users to enter some simple values. 

Dialog Classes :

  • Dialog is the main class used to construct dialogs.
  • DialogRunBase is an extension of the Dialog class that is used by the RunBase framework.
  • The DialogControl class defines a single control in the dialog. 

Main Classes used in Dialog Box are 
  •   Dialog
  •   DialogField
  •   DialogGroup
  •   DialogTabPage
  •   DialogText

Dialog Method :

  •   addField( )
  •   addFieldValue( )
  •   addGroup( )
  •   value( )
  •   run( )

   

>>>  The following simple Example explain about the Dialog   


static void theAxapta_DialogBox(Args _args)
{
Dialog              dialog;
DialogGroup    dialogGroup;
DialogField      dialogField;
;
dialog              = new Dialog("Simple Dialog");
dialogGroup    = dialog.addGroup("Customer");
dialogField      = dialog.addField(extendedTypeStr(custAccount));
if (dialog.run())
{
info(strFmt("%1",dialogField.value()));
}
}







    1.   The dialog.run() method returns true if OK is clicked, and false if Cancel is  clicked.
    2.   Dialog Group is used to group dialog fields which are logically same.

>>>  The below example is showing about the .addFieldValue( )  . If we use this method we can directly pass the value to Dialog.






>>> The below Example shows using the Tabpages.








Thanks And Regards

Ranjith Reddy