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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Assign value to custom field in VendTrans table on insert()

(1) ShareShare
ReportReport
Posted on by 166
Hi,
 
I have created a custom field(purchId) in vendTrans table. 
 
When I post journal through vendor payment journal, I want to assign value to purchId based on the transaction through insert() method of vendTrans table, 
 
Any suggestions on how this could be done? 
I have the same question (0)
  • Martin Dráb Profile Picture
    239,118 Most Valuable Professional on at
    Assigning a field value is trivial, but do you have the PurchId value in insert() method? If not, your design is wrong. You should analyze the scenario and then selecting the right place for your modification, rather then selecting a method and then wondering whether it can be done there at all.
     
    To me, the whole idea is suspicious. I would start by finding out what is the business requirement that someone wants to address by this particular code change. There may be a better solution.
     
    The relation between vendor transactions and orders isn't straightforward. For example, you may have a transaction for an invoice, but the invoice will include several orders. Or you receive a payment that isn't linked to any order at all.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,801 Super User 2026 Season 1 on at
    Hi @Arbia,
     
    There are method in LedgerJournalCheckPost class.
    Ithink you can create a COC and add your business logic inside
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Martin Dráb Profile Picture
    239,118 Most Valuable Professional on at
    That's a relation to a general ledger journal line, not to a purchase order.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 733

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 278 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans