Regarding the link between the G/L entry and the sales line

Hi guys,

I would like to know the main link between the G/L entry and sales line and also how G/L gets updated once the sales line is posted in nav....
Thanks in advance

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2017-12-15
    Generally there is no direct 1:1 link between G/L Entry and a posted sales line.

    NAV during posting compresses entries going to the same G/L account and having the same dimensions
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • bharathnanbharathnan Member Posts: 92
    ok i will check on that .
    Thank a lot
  • bharathnanbharathnan Member Posts: 92
    I added a new field in G/L entry and i now want to fetch details to that field once we post a sales order or purchase order without modifying any changes in the sales line or purchase lines.By anyway is that possible????
    Thanks in advance
  • loggerlogger Member Posts: 126
    @bharathnan ,
    You should use codeunit 80/90 and codeunit 12 to pass info from sales/purchase documents to g/l entry. But that's a really hard way.
    Let's go!
  • bharathnanbharathnan Member Posts: 92
    Is there any other ways to do that ??
  • NavNabNavNab Member Posts: 181
    edited 2017-12-15
    @bharathnan

    if you use NAV 2016 or later, then use events from codeunit 80/90.

    but as already mentioned, there is no 1:1 link. You may need to rethink your solution
  • bharathnanbharathnan Member Posts: 92
    I want to enter a new field in the G/L entry and once i post sales or purchase order i want that field to be update .Please suggest me some suggestion.

    Thanks in advance
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    You do not enter anything on G/L Entry. G/L Entries, as well as Posted Sales/Purchase documents (Invoices/Shipments/Receipts) are generated from Sales / Purchase Order - where you are supposed to enter the information.

    What do you need to add to the G/L Entries? Have you considered using dimensions to pass and store extra information, instead of modifying G/L Entry table and the posting routines?
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • bharathnanbharathnan Member Posts: 92
    No, I have not used the dimension to store the data.
    I need to insert a field in the G/L entry table in that the data should be automatically stored from the posted sales invoices or purchase invoices.

    can how to do that ??/
    Warm Regards,
    Bharath.K
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Let me rephrase this again.

    Posted Sales/Purchase documents as well as G/L Entries are both RESULTS of posting. There is no data flow between G/L Entry and posted documents.

    The data flows from Sales / Purchase Order (unposted) into G/L and posted documents.

    The information you need to record must be entered on Sales/Purchase header or lines (unposted), then you need to transfer them into General Journal Line, and then from General Journal Line into G/L Entry. The Posted Documents are created in posting code using TRANSFERFIELDS function, so if you create new custom field on Sales/Purchase Header with specific number, and use the same number in Posted Sales/Purchase document headers system will transfer the data for you - but to pass a new data into G/L Entry you need to pass it first into the General Journal Line table (in Codeunit 80/90), and then from General Journal Line into G/L Entry

    Creating the G/L Entry from General Journal Line is generally done in Codeunit 12, but in recent versions (NAV 2016+) the actual transfer takes place in function CopyFromGenJnlLine defined on G/L Entry table.

    Before you start modifying the system double-check and triple-check if you can use dimensions to record the data you need. I would strongly suggest that as the dimensions are built in feature designed exactly to do what you need - to record custom data. It is even more important in your case where you have no experience coding in NAV and you have set yourself to make changes in the core of the system not knowing how it works under the hood.

    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • bharathnanbharathnan Member Posts: 92
    Hi guys,
    nr1gpoucr5xt.png

    After posting the above sales order i want the G/L entry for the particular field to be updated can anyone suggest me some answers.I have attached screenshots of field .
  • bharathnanbharathnan Member Posts: 92
    b32xhvdxw1z5.png
  • lubostlubost Member Posts: 628
    You can link VAT via VAT Entry (table 254) where Transaction No. field is the same in G/L Entry and VAT Entry tables.
    Without deep modifying posting routines (as Slawek said) it is the only way to link VAT and G/L.
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2017-12-19
    @bharathnan

    If you've said upfront you would like to see VAT amount against each posted G/L Entry, not just "an information" or "a field" you would be pointed to the VAT Entry table straight away.

    You would save lots of time, yours and ours.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • bharathnanbharathnan Member Posts: 92
    Hi guys,
    Sorry to repeat this again,
    I would like to know to flow between sales order and G/L entry and also from which table does the G/L entry gets updated.
    Is the G/l entry gets updated from the invoice posting buffer or general journal line.
    Can anyone suggest me some answers
    Thank you
  • lubostlubost Member Posts: 628
    Invoice Posting Buffer can be used during sales post, but G/L Entry is only created from General Journal Line. Accented word is "created", because standard NAV does not contain code for "updating".
    As Slawek said I strongly recommend to not modify posting routines if you haven't detailed knowledge how they do.
  • bharathnanbharathnan Member Posts: 92
    Thanks lubost for your comments .It really helped me a lot.


Sign In or Register to comment.