In new Dynamics Ax, the extensions are created for extension. Previously we use overlay or overwrite change in Out of the box Dynamics Ax object. For example, if we have to add some fields or modification we are overlay or adding changes in original Object. Object is overwrite in configured layer. But in new Dynamics Ax we create extensions. And we added changes in extension. And run time all these extension run as single object.
This is post is third in series, you can also view previous two posts as follow.
Consider the scenario, that we writing our custom payroll and here is customer wants direct two 3 fields in Worker details.
- National Identification Number.
- Passport Number.
- Passport Expire date.
For this we create extensions and add required fields in table. So expand Tables in Application explorer. Right click on WorkerPersonalDetail table and click on extension.
New extension is created and double click on it a
Before that Right click on Project and set Data Base Synchronize properties true.
New added two string of length 20 character and added expire date and set extended data type of FromDate.
Add new group
Drag new fields in it.
Now build project to synchronized to data base.
Now expand Forms and HcmWorker and creates it extension.
Double click on form extension and open it in designer
Expand he deign portion until you reach the control, where you want to add required field. for example I want to add New fields in PersonDetail section.
Expand profile Tab page and add new group as NIC and Passport.
Set its data source and data group as follow
Save and Run Project by Ctrl+ F5.
On click and edit mode
Now we add values and save them