How to fetch data from table into the form


I have manually added the field “Net. Amount”, in my “Employee” Table, and I am making a salary sheet of my organization.

In my “Recurring General Journal” form I have added a field “Employee Code”, which is linked to “Employee” table.

I want the value of “Net. Amount”, in my “Recurring General Journal” form.

How can put the value into the “Recurring General Journal” form.

So you want to fill the value automatically after entering Employee Code or hhow do you want to calculate it?

On net amount field you can set relation for employee table.

Yes, I want to load the “Net Amount” automatically when i entered the “Employee Code”. How do i make the link?

Did you also add net amount field in Gen. Journal Line table?

So If you want to fill the net amount field automatically then you need to add that field in Gen Journal table and then you need to write a code on onvalidate trigger of employee code field as follows

Define recemployee record employee as global variable

IF recemployee.“Employee Code”=“Employee Code” Then

“Net Amount”=recemployee.“Net Amount”;

No need to create a new field on Journal table. You can simply use the Display control method to show the Net amount on Journal form. Write Diplay method on Journal table. Something like:

Display Amount netAmount()


return EmplTable::findCode(this.EmplCode).NetAmount;


This is not Dynamics AX…it is Dynamics NAV…

I made a global variable and wrote the code on onvalidate trigger, but still the data are not appearing.

Can you show us the code?

Is Net Amount Normal field or Flow field?

IF recemployee.“Employee Code”=“Employee Code” Then

“Net Amount”=recemployee.“Net Amount”;

You should get Employee Record before the code IF recemployee.GET(“Employee Code”) THEN “Net Amount”=recemployee.“Net Amount”; Is Net Amount field Normal field or Flow Field in Employee table?