Posting

RS8RS8 Member Posts: 121
Hi,

While Posting the Sales Ord, the Customer Ledger entry table gets updated, now i want new field values to be updated in that table, can anyone say the exact object which is used for updation of values in Customer ledger entry table. I want to insert few values into it. :?:

Comments

  • MBergerMBerger Member Posts: 413
    Post a sales order with the client monitor running, and you can see where the table gets inserted/updated.
  • bbrownbbrown Member Posts: 3,268
    Codeunit 12 "Gen. Jnl.-Post Line"

    You will need to add your new fields to the journal line that is created in CU 80 and passed to Cu 12
    There are no bugs - only undocumented features.
  • canadian_baconcanadian_bacon Member Posts: 91
    Create the custom fields that you require in both "Gen. Journal Line" and "Cust. Ledger Entry" and use codeunit 10201 (Transfer Custom Fields), function GenJnlLineTOCustLedgEntry to write your code to transfer values.
    eg. CustLedgEntry."Custom Field" := GenJnlLine."Custom Field";

    This makes the code much easier to maintain and also makes it much easier to apply any patches/updates/upgrades.
  • RS8RS8 Member Posts: 121
    I have created fields, but i cant able to find CU 10201, is that right? where al places i have to update code. i have done in CU 80, 12, 226. But its not updating in Cust. Ledger entry.
  • SavatageSavatage Member Posts: 7,142
    CU 10201 I believe is just in the NA version. You'll have to follow the other suggestions.
  • canadian_baconcanadian_bacon Member Posts: 91
    Oh? I wasn't aware that it was only available in the NA version. Hmm...I wonder why? It's a really simple codeunit. You just have to make sure that the calls to it are placed in the appropriate places (eg. in codeunit 12 the call is made in the PostCust function and the syntax is "XferCustomFields.GenJnlLineTOCustLedgEntry(GenJnlLine,CustLedgEntry);").
  • sendohsendoh Member Posts: 207
    CU 10201 is not available in our version. can i have that code to make a customize codeunit and put the code on it.hmmm wh :-k at will be the reason why it's just available in NA version?
    Sendoh
    be smart before being a clever.
  • DenSterDenSter Member Posts: 8,304
    Because it's part of the US localization, and it hasn't made it into the W1 version. It is REALLY nice to have though, a VERY good way to implement transfering custom fields between journals and ledgers, without touching the actual posting codeunits.

    If you want to know how it works, download the NA version from partnersource and check out that codeunit, and see how it is called in posting routines. It would be fairly straightforward to implement something similar in your own system or for customers that are not on the US localization.
Sign In or Register to comment.