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

Notifications

Announcements

No record found.

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,247

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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans