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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Inquiry on method used to Post the Free Text Invoice

(1) ShareShare
ReportReport
Posted on by 147
Hi,
 
I have a customization that needs to insert the posted Free Text Invoice record into my custom table. However, I am not sure which method from which class is used to post the Free Text Invoice.
 
I found a class named CustPostInvoiceJob from the AOT. 
 
I would like to ask if this class is used to post the Free Text Invoice? If yes, is that the method I should override is the run() method of CustPostInvoiceJob?
 
Best regards,
Yue Zhen Khor
I have the same question (0)
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    Can you share the screen from where the posting will happen?
    The easiest way to know; put break points starting from clicking the post button, to see how code is running and where is the best place to do your logic on it.  If you want more help after you are debugging code, tell me and I'll help you further.
     
     
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Yue Zhen Profile Picture
    147 on at

    the post will happen after clicking OK button
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,423 Super User 2025 Season 2 on at
    Hi @Yue Zhen,
     
    I think you must override the method custPostInvoiceUpdate in the class CustPostInvoiceJob
     
    and then you can add your bussiness logic
     
    e.g.
    [ExtensionOf(classStr(CustPostInvoiceJob))]
    final class CustPostInvoiceJob_Extension
    {
       public void custPostInvoiceUpdate()    
       {
          next custPostInvoiceUpdate();
    
          //your code ...
       }
    
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    Try to debug the code and decide which method you should use, once you write the code if you have an inquires, ask us and we will help you.
     
    Thanks,
    Waed Ayyad
  • Yue Zhen Profile Picture
    147 on at
    [ExtensionOf(classStr(CustPostInvoice))]
    final class CustPostInvoice_ADSEInvoice_Extension
    {
        protected void postCustInvoice(CustInvoiceJour _custInvoiceJour, LedgerVoucher _ledgerVoucher, boolean _creditNote, NumberSeq _numberSeq)
        {
            next postCustInvoice(_custInvoiceJour, _ledgerVoucher, _creditNote, _numberSeq);
    
            ads_EInvoiceTable eInvTable;
            eInvTable.ads_InvoiceId = _custInvoiceJour.InvoiceId;
            eInvTable.ads_ConsolidateEInvCheckbox = _custInvoiceJour.ads_ConsoEInvCheckbox;
            eInvTable.ads_SubmissionStatus = _custInvoiceJour.ads_SubmissionStatus;
            eInvTable.insert();
        }
    
    }
    I override the postCustInvoice() and seems like it is working as expected.
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi Yue,
     
    I'm glad to hear that your inquiry is resolved. Can you please verify my first comment, as it helped you? Did you check your table and see that your data was saved correctly?
     
    Thanks,
    Waed Ayyad
     
     
     
     
  • Yue Zhen Profile Picture
    147 on at
    Hi Waed,
     
    I checked and the data was saved correctly. Thank you for your help.
     
    Best regards,
    Yue Zhen
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi Yue,
     
    Can you please verify my answer as your issue is resolved.
     
     
    Thanks,
    Waed Ayyad
  • Yue Zhen Profile Picture
    147 on at
    Hi Waed,
     
    I keep trying to mark the checkbox, but the community keeps loading and the checkbox will not be marked.
     
    Best regards,
    Yue Zhen

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans