G/L and sales order and codeunit

Hi guys,

I want to create a field in sales header and i need to transfer it to g/l entry can anyone help me with flow of table in the nav and i am currently using nav 5.0 sp1 version. any answer would be appreciated.

Moreover i also wants to know how the data is transferred from sales header to g/l entry table by codeunit.

Warm regards,

Bharath. k

Look for the field “Source No.” in Gl Etnry table and folow it from Table Customer → Sales Header → Gen Journal Line ->GL entry through code units 80 and 12.

Thanks for your reply.
Is the code to be put under post VAT entrier to g/l entries and it should be added in all other places where it getting updated to all other tables

Have you tried what I suggested?

Just follow the steps above and you can basically copy how customer no gets to source no. your code will be very similar.

Hi David,
the field source NO. is field is empty in my g/l entry table Is there any other way to sort this task.
Thanks

What have you tried so far? Where are you stuck.

Hi ,
I added a field alternate number to sales header , customer and general journal line and now when i post it the field alternate number is not getting updated from sales header.
after this field is updated in general journal line only we can link it with g/l entry table .
Is that right what I am saying can you help me on this.
Warm Regards,
Bharathk

What code did you write and where? Did you follow my suggestions above?

once i post a sales order the field that i created is getting updated in customer card,sales shipment header but i am unable to update in gen.journal line .can you suggest me on how to do that because if i am able to do that then it will be easy for me to transfer to g/l entry table.
Is the things what i am saying is right or not i dont know .i just saying it upto my knowledge .please suggest me some answers.
thanks

Yes, but where did you add the code?
You start by asking which codeunit is being used to transfer the fields, but you write that you have already written this code.

David already answered the general flow, but you can find more in this old blog post: dynamicsuser.net/…/how-to-become-a-great-microsoft-dynamics-nav-developer-which-tables-to-use

If the data is not being transferred, the code you wrote to do this is most likely wrong. You have to do it the correct place in codeunit 12, for it to be transferred to the G/L Entry table.

Hi Erik,
Good to hear from you.
I just want to know how the general journal lines are created.
are the sales order are grouped according to some posting group in gen.journal line .Can you suggest me some solutions for this.
thanks
bharath k

What have you tried so far?

Hi,
I have created a field in customer(T),sales header(T),cust.ledger entry(T) ,General journal line(T) and G/L entry(T).
Now i am able to transfer that field from sales header to cust.ledger entry but i am unable to do it so in gen.journal line (T),Can you suggest me on how to do that , and also after transferring to gen.journal line i want to transfer the same field to the g/l entry (T).
This what i Have done so far.
I have modified in salespost(CU) to transfer the field from sales header to the shipment header .Now suggest on how to transfer it to gen.journal line.
thanks
bharath k

If you turn on the debugger and put breakpoint in codeunit 80. And then just step forward, then you will come to it. Same place where it updates the other fields in gen. journal line.

Thanks
I solved the issue

Very good. Please let us know how you solved it, and if any of the replies helped you. If that’s is the case, then please click on the “This helped me” link, below the reply.