I want to link G/L Entry to Sales Invoice using Code Unit? I am using Document No field as reference field now. But that is not sufficient. One more reference field is required in my case. Which field we can use for this? Or Is there any other table in NAV using which we could establish a link between G/L Entry & Sales Invoice?
Regards & Thanks
Take a look on the Navigate function, it should helps…
As suggested, the filter is on Document No. and Posting Date
The combination of Document No and Posting Date is not unique. We need a key field ( either combination )
to identify each record or can we connect through any other tables?
The Sales Invoice No. (or Document No. in G/L Entry) is a Primary Key for Sales Invoice Header table. Therefore, you will not have a duplicate Sales Invoice No.
Perhaps you can use this combination to filter the G/L Entry
- Source Code = SALES (it depends on your Sales Source Code Setup)
- Document Type = Invoice
- Document No. = Sales Invoice No.
- Posting Date = Sales Inv. Posting Date
Actually i need to update all the past records in the GL Entry table .Can we link with Value Entry and GL Entry table? Without Document No any other additional key field is there ??
based on what? What is the condition of record you wish to look for?
If it is based on Sales Invoice, you can give my suggestion a shot. It will give you a set of records in G/L Entry for your Sales Invoice queried. You can’t post a duplicate Sales Invoice No.
I need to update the Amount(LCY) field in the GL Entry with Sales invoice Line . I need to convert the Line Amount in the Sales Invoice Line with the current Posting date. Prevously we posted the records with the wrong exchange rate with different posting date.So i need to update the entire Amount Field in GL Entry with the corresponding records from the Sales Invoice Line. The Line Amount in the Sales Invoice Line is FCY. Hence only i need the another link without Document. Both the fields should be unique or can we connect through any other tables? .Then only my issues will be solved .
Have you considered creating a Sales Credit Memo? You’ll never know what will happen in the future if you change the amount directly in G/L Entry. Sorry if my replies don’t help much in this.
Well, I CAN say what will happen almost for sure… You will end up in a corrupted database and misbalanced GL. [:@]
DON’T do that, there are serious reasons WHY GL should NEVER be manipulated directly. Instead, do this as it should be done - CM’s, ReturnOrders, as you like. And don’t argue there is a great amount of them, you simply can not do it the other way, tampering with GL entries, as you are intending to do.
You can use “G/L - Item Ledger Relation - 5823” table to link Items in sales invoices.