Codeunit 80 Sales-Post

zakretzakret Member Posts: 7
Hi

In codeunit 80 (Sales-Post) which line insert SalesLine Entryies to G/L Entry during posting Credit Memo?


Best Regards
Tomek Zakrecki

Comments

  • pri_1_ranjanpri_1_ranjan Member Posts: 67
    where ever u see
    codes such as 'RunGenJnlPostLine(GenJnlLine,########);' .......... these function are used for transfering the record of general jounral to code unit 12 where actual gl entries are made ... hope this helps :)
    /PDR
  • krikikriki Member, Moderator Posts: 9,112
    There is no exact line that does it.
    In Navision, the the lines are grouped per account no, dimensions and possibly other fields to avoid creating 1 G/L account entry per line.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • pri_1_ranjanpri_1_ranjan Member Posts: 67
    hmm ...
    that is true !!
    /PDR
  • robastarobasta Member Posts: 11
    does anyone have a chart/diagram or any resource that shows the process flows within the sales-post, i am trying to add fields to the "Cust Ledger Entry" table from the "sales header"
  • krikikriki Member, Moderator Posts: 9,112
    I don't think that exists.

    There are posts with info on how to do it, but I don't remember which.
    Some hints:
    You need to create the field in T36:"Sales Header", T81:"General Journal Line", T21:"Cust. Ledger Entry.".
    In codeunit 80, you have to search where codeunit 12:"Gen. Jnl.-Post Line" is called. Just before the call you have to put the field from T36 into T81.

    In codeunit 12, you have to search for "INSERT". Just before the INSERT into table 21, you need to move the field from T81 to T21.

    It is not so difficult, it is just searching for those points and put 1 line of assignment to get it working.

    PS 1 last advice : give the new field the same UNIQUE field ID in all your tables where it is used. E.g. You give it ID=90000 in all tables. This means that NO OTHER field can have ID=90000. It is a trick I use and it helps a lot in certain circumstances.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • robastarobasta Member Posts: 11
    thanks so much, that was very helpfu and quick, thanks i managed to add my assignment to the code units and now its working fine...
  • lavanyaballurgilavanyaballurgi Member Posts: 235
    In Codeunit 80 the Codeunit 12 ("Gen. Jnl.-Post Line") is called so many times. How to know before which CALL shall I put my coding to copy a field from Sales Header to Gen. Jnl line's new field (which in turn will be copied to Cust ledger entry)
  • krikikriki Member, Moderator Posts: 9,112
    It is called for different reasons: G/L Accounts, the Accounts for the items, the total of the invoice.
    So the best is that you put it in all calls.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • lavanyaballurgilavanyaballurgi Member Posts: 235
    Yes you are absolutely right because I put my code in one place & was not able to see the field updates in "Service Tax" entry.
    Will copy the same before every call.
  • bharathnanbharathnan Member Posts: 92
    Hi guys ,
    Like transfering field to cust.ledger entry from sales header, I would like to do to transfer from sales header to g/l entry can anyone suggest me on how do this..
    Thanks
    Bharath k
  • lubostlubost Member Posts: 627
    The flow changes from version to version of NAV. Which version is focused?
    pri_1_ranjan served the best hint.
  • bharathnanbharathnan Member Posts: 92
    Version is NAV 2009 sp1
  • JuhlJuhl Member Posts: 724
    Also you can use a where used tool.
    I use the free GDT software.
    Follow me on my blog juhl.blog
  • krikikriki Member, Moderator Posts: 9,112
    In codeunit 80, transfer the fields from sales header to general journal line.
    In codeunit 12, transfer the fields from general journal line to G/L entry
    And do use hooks (and events for later versions)!
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.