Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Adding two new fields to LedgerTransVoucher

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone,

I have  to add two new fields in the form of LedgerTransVoucher that display the AccountNum and Name of both customers and vendors based in the Voucher value. So i added two display methods that return correctly the two fields but the ctrl+G doesn't work with display methods. I have read some posts that suggest to create a syscomputed column in a view but in this case it doesn't work because the table of generalJournalEntry related to the form can't be linked to the two datasources CustTrans and VendTrans (that contain the accountNum) at the same time. i have tried to make it work but it isn't possible. 

So i have i want to create two new fields in GeneralJournalEntry (accountNum and name) to relate it to the form but i can't know where to insert the code that retrieves the data from custTrans, vendtrans and dirpartyTable( that contains Name field).  I need your help please.

Best regards

*This post is locked for comments

  • Suggested answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: Adding two new fields to LedgerTransVoucher

    Take a look at the LedgerVoucherObject class and new() method.

    You can fill the new fields there. But you should debug posting process first to be sure what all necessary data you can get.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Adding two new fields to LedgerTransVoucher

    Ok Crispin, i 'm reading about batch job, i understand what it gives but the  object type of the menu item LedgerTransVoucher is the form. i can't modify it to call the batch job that should be created. Do you mean that if i create a new menu item that calls the batch job class it will retrive the data from cut/vendTrans to the new fields in ledgerJournalEntry?

    Regards;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Adding two new fields to LedgerTransVoucher

    Hi Crispin,

    Can you explain more please? thank you,

    Best regards

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans