web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to bypass standard table method in d365 x++

(0) ShareShare
ReportReport
Posted on by 167

Hi, 

I have a requirement in which I  want to skip standard method table LedgerJournalTran and instead want to write my method.

Please suggest me the way to achieve this.

Thanks!!

I have the same question (0)
  • Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi, Please provide more details like which method you want to skip and from that standard method might be calling from several places, do you want to skip from all method calls or a specific one?

    General suggestion to skip method is to write your own method and try to find condition that you can modify to call standard method.

  • D365 ER Profile Picture
    167 on at

    Hi Mohit ,

    While creating the vendor payment proposal using accounts payable> payment> vendor payment journal> create payment proposal...I want Notes section to be empty under payment tab.

    I found there is method fillPaymentNotes in LedgerJournalTrans.... which is filling the Notes field but didn't find the way to empty the notes section.

    Thanks!!

  • Verified answer
    Phil Matthews Profile Picture
    98 on at

    You can achieve this in multiple ways, depending on whether you will want the Notes section to be empty under all circumstances, and if not, when.

    You could create an extension class of LedgerJournalTrans table and extend the fillPaymentNotes to set the value as blank, but this will only be effective when the fillPaymentNotes method is called, or you could add an Event Handler on LedgerJournalTrans table to set it to be blank before the record is written to the database.

    Before you do this, you should consider whether you want the Notes section to be empty on all Vendor Payment Journals, or just ones created using specific processes.

  • Verified answer
    GirishS Profile Picture
    27,843 Moderator on at

    If COC doesn't work - You can write Post event handler for the method "fillPaymentNotes" and make "PaymentNotes" field to empty string

    based on the condition.

    Thanks,

    Girish S.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
SajeedMullaji Profile Picture

SajeedMullaji 698

#2
Martin Dráb Profile Picture

Martin Dráb 327 Most Valuable Professional

#3
CU10121822-0 Profile Picture

CU10121822-0 320

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans