web
You’re offline. This is a read only version of the page.
close
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 2,162

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

I have the same question (0)
  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    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.

  • MYGz Profile Picture
    2,162 on at

    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.

  • MYGz Profile Picture
    2,162 on at

    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
    2,162 on at

    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.

  • D365 FO LCS Azure connectors Profile Picture
    5 on at

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans