• Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Recommended Readings
    • 2022 Book Reading
    • 2023 Recommended Readings
    • Book Reading 2024
    • Book Reading 2025
  • Supply Chain Management Guide
  • PKM
  • Microsoft Excel

Ali Raza Zaidi

A practitioner’s musings on Dynamics 365 Finance and Operations

Form Development from scratch Dynamics Ax 2012 R3 part 2

June 1, 2015 by alirazazaidi

Now we start development of form. First form we will build for Simple list form for Diagnostic table

For this open AOT and right click on Form Node and click on simple list form template

SimpleListSelection

 

Drag newly created form in Project and rename it “DiagonasisticTable”.

DiagonasisticTableForm

Expand DiagonsisticTable form and Right click on data source node to new Data source. Update name of name and Table name as DiagonsisticTable.

DiagnonsticDataSource

Now expand Designs=> Design Expand=> group Container and select grid

 

Grid

Right click on grid, click on properties window and set these properties

Data Source: DiagonasisticTable

DataGroup: overView

GridProperties

 

Save the form and right click on form open it. The form will look like similar

NewDiagonaistic Form

 

If you try to enter duplicate values in Diagnostic number field. Due to unique index on Diagnostic number it did not let you do it.

DiagonistiIndexWorking

 

 

 

 

New create a display menu with Name “MnuDiagonisticTable” and set it object Type to form and object Name as “DiagonisticTable”.  Save it.

diaganostic

 

Now expand Diagonaistictable right click on it and set its “FormRef” property with mnuDiagonisticsTable

DiaganosticViewMnu

This property provides us option of “View Details” on lookup field. We see its function in Master detail form.

 

Detail form:

 

Now we create a detail from for patient table. Create a new form and add data source and set its Name and DataSource value to Patienttable.

patientTableForm

Right click on PatientTable data source and set “InsertIfEmpty” to false

AdmissionSource

 

Now expand Designs and add new action tab, inside button group add three command buttons.

Rename them into “btnNew”, “btnEdit” and “btnDelete”. And from property window set their command to new, edit and delete.

NewButton

 

You can also select button Image by update following Properties

 

New Img property

Now expand Designs=>Design under ActionTab add a new Tab. Set Tab style property to fast tab.

Add new tab page in Tab and set is width and height value as follow

 

Tabs

 

 

Add new group control set its width and height like above one and column property to 2.

And set is data source to patientTable and Data group property to overview

PatientGroupProperties

Now form structure will look like

PatientDetailsStructure

Now open the form let’s see how it look like

PatientDetailsgroup

Test the form and click add remove entries

PatientFormWithData

 

Parent child form:

 

Now we expand patientTable form to Parent child form.

Now expand DataSource of node of PatientTable form and add a new data source. And set its table property to AdmissionTable, Name to AdmissionTable, and Set its JoinSource to PatientTable

 

AdmissionSource

 

 

PasteActionTabl

 

 

Now expand the form designer and add a new tab Page under patient tab and add new action pane There Set DataSource Property of ActionTab to AdmissionTable so all control inside this action tab works for AdmissionTable. In Button group add three command buttons and set their name “BtnNewAdmission”, “BtnEditAdmission” and “BtnDeleteAdmission”. After this set  there command property  to “New”,”Edit” and “Delete”.

AdmissionButton

Now add a grid in this tab and set its data Source to AdmissionTable.

AdmissionGrid

 

 

Drag and drop fields from AdmissionTable data Source to grid

AdmissionGridFields

 

Now open the form lets how it look like

Our parent Child from

You can see that here admission Date is greater than Discharge Date, for this we have to add some validation rules, which are not part of current post. We let it go.

AdmissionTableGridWorks

If you right click on diagnostic number field in grid, from pop up menu view detail option leads us Diagnostic table form.

ViewDetail link

 

This option comes due to we add menu Item in table properties in one of above step I am again adding its picture here

DiaganosticViewMnu

 

Now we create a new Display Menu Item “MenuPatientTable” and set its object property to

PatientMenu

 

Now we create a List page for Patient and attached Patient detail form with it.

 

For list page template we cannot attach table in data source for this we can create a Static Query Object. This Query Object will use as data Source in Form

 

First we have to create a Query. Re Name it to PatientQuery and form its DataSource add Patient table

PatientQuery

 

Expand PatientTable source in data table and right click on fields and set its field property to yes

QueryFieldDynamicsYes

 

After saving you will find all fields in Query

QueryFieldDetails

 

 

Now open AOT and right click on Form Node. From pop up menu select form template and then select list page.

ListPage

 

Now search form with similar CopyOfSysBPStyle_ListPage Name.  Drag it to your project and rename it to PatientListPage

PatientListPage

Now expand Patient List page and set data source and sets property to PatientQuery. This query we created in previous step

PatientListPageQueryDataSource

 

This will result in all tables in query in forms data source. By default these table have create and edit to no.

PatientListPageTablesList

Expand Designer  node of Form and select grid and set its dataSource property to Patient and drag and drop required fields from PatientTable_1 data Source to form.

 

Patient list Page grid

 

Now drag and drop required fields from data source to grid

PatientListPageGridFields

 

PatientListPageWorking

 

Now we are going to attached PatientDetail form with Patient

Now we add the Add, edit, delete and view functionality which leads the PatientDetail form

Expand the action tab in form and right click on menuItemButton  “newbutton”

PatientListPageAddNew

Set following properties

 

PatientAddNewButton

 

Expand next button group “MaintainedGroup” and and Open property window of EditButton

 

PatientlistPageEditButton

From Property window set following fields

DataSource = “PatientTable_1”

OpenMode =”Edit”

CopyCallerQuery=”Yes”

MenuItemName =”mnupatientTable”

PatientListPageEditButtonProperty

 

Now select mnuItemButton “ViewButton”

patientListPageViewButton

 

From Property window and set

DataSource = “PatientTable_1”

OpenMode =”View”

CopyCallerQuery=”Yes”

MenuItemName =”mnupatientTable”

 

PatientListPageViewButtonProperties

 

 

 

 

 

Now expand grid in form and set following property to MenuItemButton “ViewButton”, which we set in above step, so when we click on grid, detail form opens

patientListPageGridProperyToOpenListViewPage

 

 

Now run the form and lets try all functions.

 

Now create a new Display menu Item Say “MnuPatientListPage”. Set its form Property as follow

Menufor ListPage

 

Suppose That is hospital registration development is part of Accounts Payable module.

MnuList

Expand the menu Accounts Payable module expand common.

Add a new menu Item or drag drop existing menu item Common Set its following properties

Menufor ListPage

 

Now Open Ax client and open Account Payable area page

AccountsPayableAreaPage

 

PatientListPageINClient

 

Filed Under: Dynamics AX 2012, Tips and tricks Tagged With: Dynamics Ax 2012

Primary Sidebar

About

I am Dynamics AX/365 Finance and Operations consultant with years of implementation experience. I has helped several businesses implement and succeed with Dynamics AX/365 Finance and Operations. The goal of this website is to share insights, tips, and tricks to help end users and IT professionals.

Legal

Content published on this website are opinions, insights, tips, and tricks we have gained from years of Dynamics consulting and may not represent the opinions or views of any current or past employer. Any changes to an ERP system should be thoroughly tested before implementation.

Categories

  • Accounts Payable (2)
  • Advance Warehouse (2)
  • Asset Management (3)
  • Azure Functions (1)
  • Books (6)
  • Certification Guide (3)
  • Customization Tips for D365 for Finance and Operations (62)
  • D365OF (59)
  • Data Management (1)
  • database restore (1)
  • Dynamics 365 (58)
  • Dynamics 365 for finance and operations (135)
  • Dynamics 365 for Operations (165)
  • Dynamics AX (AX 7) (134)
  • Dynamics AX 2012 (274)
  • Dynamics Ax 2012 Forms (13)
  • Dynamics Ax 2012 functional side (16)
  • Dynamics Ax 2012 Reporting SSRS Reports. (31)
  • Dynamics Ax 2012 Technical Side (52)
  • Dynamics Ax 7 (65)
  • Exam MB-330: Microsoft Dynamics 365 Supply Chain Management (7)
  • Excel Addin (1)
  • Favorites (12)
  • Financial Modules (6)
  • Functional (8)
  • Implementations (1)
  • Lifecycle Services (1)
  • Logseq (4)
  • Management Reporter (1)
  • Microsoft Excel (4)
  • MS Dynamics Ax 7 (64)
  • MVP summit (1)
  • MVP summit 2016 (1)
  • New Dynamics Ax (19)
  • Non Defined (9)
  • Note taking Apps (2)
  • Obsidian (3)
  • Personal Knowledge Management (2)
  • PKM (13)
  • Power Platform (6)
  • Procurement (5)
  • procurement and sourcing (5)
  • Product Information Management (4)
  • Product Management (6)
  • Production Control D365 for Finance and Operations (10)
  • Sale Order Process (10)
  • Sale Order Processing (9)
  • Sales and Distribution (5)
  • Soft Skill (1)
  • Supply Chain Management D365 F&O (3)
  • Tips and tricks (278)
  • Uncategorized (165)
  • Upgrade (1)
  • Web Cast (7)
  • White papers (4)
  • X++ (7)

Copyright © 2025 · Magazine Pro On Genesis Framework · WordPress · Log in