Conditional DrillDown Page for FlowFields

Hello,

I just want to ask if it is possible to have a conditional DrilldownPageID for a certain FlowField I use in a Factbox. Its a counting flowfield. I want to open the detailpage if counter is 1 and list page if counter is greather than 1. Is this possible in BC?

Is it also possible to get a Record of a FlowField Counter? For example to pass this to a Page.Run?

Thanks in Advance for your help!

Best regards
Mike

Hi Mike!
Yes, this should be possible. Think about a cue on a role center (which is typically found on an Activities page). I’m going to use page 9056 "Warehouse Worker Activities as an example. On the table Warehouse Worker WMS Cue we have a field My Picks. This showing you a count of some records via a flowfield.

On the page we have a RunObject, but for your specific use case, where you want to launch different pages on drilldown, you would instead use the trigger OnDrillDown().

You would need to filter a variable for the record you want to pass to the page (just basically use the same filter conditions that are part of the FlowField)
ex.

trigger OnDrillDown()
var
   WhseActivityHdr : Record "Warehouse Activity Header";
begin
    WhseActivityHdr.Reset();
    WhseActivityHdr.SetRange("Type", WhseActivityHdr.Type::Pick);
    // Set filters here
    if Rec."My Picks" > 1 then
        Page.Run(Page::"Warehouse Picks", WhseActivityHdr)
    else
        Page.Run(Page::"Warehouse Pick", WhseActivityHdr);
end;

I hope this helps!