Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Post custom field from LedgerJournalTrans To 1. CustTrans and 2. GeneralJournalAccountEntry

(0) ShareShare
ReportReport
Posted on by 1,935

Hi,

I'm able to pass a custom field from LedgerJournalTrans to CustTrans on Posting from General Journal by following the below link:

https://vgrandhi.wordpress.com/2013/12/24/post-a-custom-field-to-vendtranscusttrans-through-journal/ 

I have also implemented passing that custom field from LedgerJournalTrans to GeneralJournalAccountEntry by following this link:

http://vsitblog.blogspot.com/2013/08/pass-customized-fields-to.html

The problem I'm facing is, when a customer transaction is posted from general journal, that custom field is passing to CustTrans but not to GeneralJournalAccountEntry (Main Account Ledger Entry via Posting Profile linked to customer). Any clue on which method to look for?

Next I want to implement it for Intercompany transactions. Any tips greatly appreciated.

Thanks.

*This post is locked for comments

  • RE: Post custom field from LedgerJournalTrans To 1. CustTrans and 2. GeneralJournalAccountEntry

    Hi Mohammad,

    I am facing the same problem. http://vsitblog.blogspot.com/2013/08/pass-customized-fields-to.html. this blog is removed. could you please share the details of this blog?

    I made changes in custVendVoucher.post() too. GJAE table's custom field is empty.

  • MYGz Profile Picture
    MYGz 1,935 on at
    RE: Post custom field from LedgerJournalTrans To 1. CustTrans and 2. GeneralJournalAccountEntry

    Hi Sukrut,

    I finally found the method which was missing the customization.

    It's CustVendVoucher.post().

    On line 263, I added this and the new field in the main account entry (related to Customer) in GJAE table is now getting populated successfully.

    ledgerVoucherTransObject.parmNewField(ledgerJournalTrans.NewField);

    Thanks.

  • MYGz Profile Picture
    MYGz 1,935 on at
    RE: Post custom field from LedgerJournalTrans To 1. CustTrans and 2. GeneralJournalAccountEntry

    Hi Sukrut,

    This is what my entry looks like:

    Account(customer)            Debit       Credit        OffsetAccount (ledger)

    Cust01                             2000.00                      3001-01-04

    The Customer is linked to Main account say 4001 via posting profile. I'm trying to read the code to identify where the transaction for 4001 is created.

    On running the Tracking Cockpit, I found out that Only once the data is being inserted into General Journal Account entry as opposed what I expected 2 times. 1 for OffsetAccount 3001 and other for Customer 4001. But seems like a recordInsertList is created and both are inserted at once. But it's hard to locate how it's happening because of huge validations and functionalities in the code. Check the below stack trace, it's sorted with name:

    LJTS-TO-GJAE-Trace.png

    I think this is the place where Entry for LedgerAccount is getting posted (LedgerJournalCheckPost.postJournal() , line 901)

    while (ledgerJournalTrans.LedgerDimension || ledgerJournalTrans.AmountCurDebit || ledgerJournalTrans.AmountCurCredit)
    {
    if (!this.postTrans(
    ledgerVoucher,
    ledgerJournalTrans,
    originalLedgerJournalTrans,
    exchRateForAccountCompany,
    exchRateSecondaryForAccountCompany,
    euroTriangulationForAccountCompany,
    exchRateForCurrentCompany,
    exchRateSecondaryForCurrentCompany,
    euroTriangulationForCurrentCompany,
    hasOffsetAccount,
    false,
    isOffset,
    journalHasAccruals,
    oldCurrencyCode,
    anyReversalsExistForJournal,
    ledgerPostingMessageCollection))
    {

  • MYGz Profile Picture
    MYGz 1,935 on at
    RE: Post custom field from LedgerJournalTrans To 1. CustTrans and 2. GeneralJournalAccountEntry

    Hi Sukrut,

    The methods you suggested are already customized because of which LJTS to GJAE is working. But What is not working is LJTS to GJAE via CustTrans (ie Customer Posting Profile).

    For a AccountType=Ledger it's passing from LJTS to GJAE but not for AccountType=Customer.

  • Suggested answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,680 Moderator on at
    RE: Post custom field from LedgerJournalTrans To 1. CustTrans and 2. GeneralJournalAccountEntry

    You have look for class LedgerVoucherTransObject  , method  you have to look for are - getLedgerPostingTransaction, initFromLedgerPostingTransaction , newTransLedgerJournal and implement similar logic you have implemented in getLedgerPostingTransaction method as suggested in the blog linked by you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans