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)

How to update a custom field in CustInvoiceJour table on settling customer invoice?

(0) ShareShare
ReportReport
Posted on by 1,813

Hii,

In CustInvoiceJour table I have a custom field name CollectionStatus of type base enum. This enum has three values 1. Not Collected, 2. Collected, 3. Partially Connected

I have developed a new Form with CustInvoiceJour table a datasource and name it Collection Status Form. Please see the pic of this form.

Whenever there is settlement/collection of amount for an invoice of a customer is done, a user opens this form, and select that invoice and update CollectionStatus value.

We do invoice settlement in both AR -> Payment journal and GL -> General journal.

Requirement: In which table/class method etc should I do customization that, whenever doing invoice settlement either in AR or GL, CollectionStatus field of CustInvoiceJour should auto update based on invoice fully or partially paid.  

Collection-Status.png

 Thanks

*This post is locked for comments

I have the same question (0)
  • Rana Anees Profile Picture
    1,813 on at

    help please...

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Maybe you could just use form "Open customer invoices" (Accounts receivable - Invoices - Open customer invoices). There you can see Invoice amount and Amount not settled. So you can see if the invoice is not settled or partially settled. Any invoice that is not visible here is completely settled.

  • Rana Anees Profile Picture
    1,813 on at

    Thanks for replies. But where to write the code to update the status...that's what I am searching for. Thanks.

  • Rana Anees Profile Picture
    1,813 on at

    Help Please...

  • Rana Anees Profile Picture
    1,813 on at

    Help Please...

  • Rana Anees Profile Picture
    1,813 on at

    I want to update the CustInvoiceJour.CollectionStatus right after the customer invoice journal is posted with conditions as

    If invoice settlement amount is less than  CustInvoiceJour Invoice Amount then CustInvoiceJour.CollectionStatus = Partially Collected.

    If invoice settlement amount is equal to CustInvoiceJour Invoice Amount then CustInvoiceJour.CollectionStatus = Collected.

    Which class/table method should I explore to achieve above task.

    Thanks,

  • Rana Anees Profile Picture
    1,813 on at

    CustTrans.settleTransact should I write my code in this method?

    I am not sure when this method is fired. I made a break point for debugging but never reached.

    Any idea...

    Thanks,

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Hi Rana Anees!

    Try to set breakpoint to update() method in CustTrans table and do settlement and reverse settlement.

    You can add your code to update() method or create event handler subscription on update() method or you can write your code in settlement and reverse settlement process.

  • Rana Anees Profile Picture
    1,813 on at

    I want to update the CustInvoiceJour.CollectionStatus  when the General Ledger -> General Journal is Posted and this journal have a customer invoice for settlement. After posting voucher, I want to get record from CustInvoiceJour table based on settled InvoiceId and settled amount.

    LedgerJournalCheckPost.postJournal() is this is right place??

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Sukrut Parab Profile Picture

Sukrut Parab 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans