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

Announcements

News and Announcements icon
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,843 Moderator on at

    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,573 Moderator on at

    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

    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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April 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 587

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 552 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans