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

Community site session details

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

how to get invoice amount from vend invoice journal form and display it on Purchase Table form grid?

(0) ShareShare
ReportReport
Posted on by 226

i am working on form customization and wanted to add invoice amount from vend invoice jour form to Purch Table form. I have used COC to add up the field .

but its not showing any data on purchase order form.

any guidence?

 

[Extensionof (formStr(PurchTable))]
final class PurchTableForm_Extension
{

    
    
    public void  getInvoiceAmount()
    {
        VendInvoiceJour  vendinvoicejour;
        PurchTable purchTable;
        AmountCur invoiceAmount;

        select * from  vendinvoicejour 
            where purchTable.PurchId == vendinvoicejour.PurchId;

        purchTable.InvoiceAmount = VendInvoiceJour::findFromPurchId(purchTable.PurchId).InvoiceAmount;

        
    }

}

I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at
    RE: how to get invoice amount from vend invoice journal form and display it on Purchase Table form grid?

    Hi Junaid,

    If you have created new field in the PurchTable then you need to write a script to update the value to the new field for old records. For new records you need to decide when to populate this field.

    If it's simple field to display the invoice amount in PurchTable you can go with adding display method instead.

    Refer to the below blog for adding display method.

    https://community.dynamics.com/365/financeandoperations/b/howtodynamics365/posts/how-to-create-display-method-for-table-extension-in-dynamics-365

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at
    RE: how to get invoice amount from vend invoice journal form and display it on Purchase Table form grid?

    Hi, you don't need select statement. You can refer below code. Have you mapped this method to field in PurchTable form? You can add display method (If you don't want to export data or filter it in form).

     public void  getInvoiceAmount()
        {
            VendInvoiceJour  vendinvoicejour;
            PurchTable purchTable = this.dataSource(IdentifierStr(PurchTable)).cursor();
            AmountCur invoiceAmount;
    
            purchTable.InvoiceAmount = VendInvoiceJour::findFromPurchId(purchTable.PurchId).InvoiceAmount;
            
        }
    

  • JJDunaid Profile Picture
    226 on at
    RE: how to get invoice amount from vend invoice journal form and display it on Purchase Table form grid?

    Girish ,

    this blog helped me , its now working. My issue is solved by display method.

    Thanks,

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 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans