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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

FLowField On Page Function Not Working

(0) ShareShare
ReportReport
Posted on by 3,297

Hi Guys

I have created a function in the item list page that uses a flow field for vendor (second vendor) and it does not work when using in SetRange filter.

In below code first sample using flow field for Vendor does not work however if I use the standard Item vendor field in the second example it works:

//flow field doesn’t work

begin

    PurchasePrice.Reset();

    PurchasePrice.SetRange("Item No.", pItemNo);

    CalcFields(FlowFeildSupplier1);

    PurchasePrice.SetRange("Vendor No.", Rec.FlowFieldSupplier1);

    if PurchasePrice.FindFirst() then

        Supplier1Price := PurchasePrice."Direct Unit Cost";

    exit(Supplier1Price);

end;

 

//works

begin

    PurchasePrice.Reset();

    PurchasePrice.SetRange("Item No.", pItemNo);

  

    PurchasePrice.SetRange("Vendor No.", Rec.”Vendor No.”);

    if PurchasePrice.FindFirst() then

        Supplier1Price := PurchasePrice."Direct Unit Cost";

    exit(Supplier1Price);

end;

 Any ideas or workarounds welcome 

I have the same question (0)
  • Verified answer
    Rishikesh Tiwari Profile Picture
    130 on at

    Please use find before using CALCFIELDS.

  • Terrance Morgan Profile Picture
    515 on at

    Drilldown = true does not change anything. Besides: BC already recognizes my fields as "drilldownable" because it shows the field with a link I can click on. This used to work a few releases ago, just like it did for years in NAV because it implicitly knew which table (and therefore wich page) to run. What sense do these properties have then?

    Page.RunModal is not supposed to throw an error when the page ID given is 0. PageId = 0 means "use the default LookupPageId", just as it is clearly stated in the documentation (docs.microsoft.com/.../page-runmodal-function).

    --
    Terrance | MS Dynamics 365 Admin

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,965 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,125 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 961 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans