Skip to main content

Notifications

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 208

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;

        
    }

}

  • JJDunaid Profile Picture
    JJDunaid 208 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,

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 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;
            
        }
    

  • Verified answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,846 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans