Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Flow field on Purchase Line Table

(1) ShareShare
ReportReport
Posted on by 53
Hi,
 
I have the following code to extend the item page to display the last purchased date, it works fine:
 
My question is what is the easiest way for this field to also be available to the 'Purchased Line (39)' Table so I can display it on the Purchase Order Subform (54, ListPart) when creating a purchase order without having to go to the item page...
 
 
tableextension 53023 "Item Extension last purchased" extends Item
{
    fields
    {
        field(53023; "Last Purchase Date"; Date)
        {
            Caption = 'Last Purchase Date';
            FieldClass = FlowField;
            CalcFormula = Max("Item Ledger Entry"."Posting Date" WHERE ("Item No." = FIELD("No."),
                                                                         "Entry Type" = FILTER(Purchase),
                                                                         Quantity = FILTER(>0)));
        }
    }
}
pageextension 53023 "Item Card Extension Purchased" extends "Item Card"
{
    layout
    {
        addlast(Item)
        {
            field("Last Purchase Date"; Rec."Last Purchase Date")
            {
                ApplicationArea = All;
                Caption = 'Last Purchase Date';
            }
        }
    }
}
 
 
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    Flow field on Purchase Line Table
    Hi, hope the following helps.
    Dynamics 365 Business Central: FlowFields (Sum, Average, Exist, Count, Min, Max, Lookup)
     
    Dynamics 365 Business Central: A flow field is part of the query column list, this is not supported (Flowfield based on Flowfield)
     
    Thanks.
    ZHU
  • Suggested answer
    Ramesh Kumar Profile Picture
    Ramesh Kumar 233 on at
    Flow field on Purchase Line Table
    You can use flowfields and extend the table with tools like Simple Object Designer, requiring minimal coding
  • Suggested answer
    Yi Yong Profile Picture
    Yi Yong 1,470 Super User 2024 Season 2 on at
    Flow field on Purchase Line Table
    Hello,
     
    You can use FlowField with Lookup.
    tableextension 50000 Table1 extends "Purchase Line"
    {
        fields
        {
            field(50000; "Lookup Field"; Decimal)
            {
                FieldClass = FlowField;
                CalcFormula = lookup(Item."Last Direct Cost" where("No." = field("No.")));
            }
        }
    }
     

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans