Skip to main content

Notifications

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
  • Yue Zhen Profile Picture
    147 on at
    Inquiry on method used to Post the Free Text Invoice
    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
  • Waed Ayyad Profile Picture
    8,220 Super User 2025 Season 1 on at
    Inquiry on method used to Post the Free Text Invoice
    Hi Yue,
     
    Can you please verify my answer as your issue is resolved.
     
     
    Thanks,
    Waed Ayyad
  • Yue Zhen Profile Picture
    147 on at
    Inquiry on method used to Post the Free Text Invoice
    Hi Waed,
     
    I checked and the data was saved correctly. Thank you for your help.
     
    Best regards,
    Yue Zhen
  • Waed Ayyad Profile Picture
    8,220 Super User 2025 Season 1 on at
    Inquiry on method used to Post the Free Text Invoice
    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
    Inquiry on method used to Post the Free Text Invoice
    [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
    8,220 Super User 2025 Season 1 on at
    Inquiry on method used to Post the Free Text Invoice
    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
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    21,550 Super User 2025 Season 1 on at
    Inquiry on method used to Post the Free Text Invoice
    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
  • Yue Zhen Profile Picture
    147 on at
    Inquiry on method used to Post the Free Text Invoice

    the post will happen after clicking OK button
  • Suggested answer
    Waed Ayyad Profile Picture
    8,220 Super User 2025 Season 1 on at
    Inquiry on method used to Post the Free Text Invoice
    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
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,069 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,858 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans