Hi everyone,
In table 9055 “Purchase Cue”, the field Outstanding Purchase Orders is defined as a FlowField:
field(4; "Outstanding Purchase Orders"; Integer)
{
AccessByPermission = TableData "Purch. Rcpt. Header" = R;
CalcFormula = count("Purchase Header" where("Document Type" = filter(Order),
Status = filter(Released),
"Completely Received" = filter(false),
"Responsibility Center" = field("Responsibility Center Filter")));
Caption = 'Outstanding Purchase Orders';
Editable = false;
FieldClass = FlowField;
}
On page 9063 “Purchase Agent Activities”, the FlowField is also assigned in OnAfterGetRecord via CalculateCueFieldValues():
local procedure CalculateCueFieldValues()
begin
if Rec.FieldActive("Outstanding Purchase Orders") then
Rec."Outstanding Purchase Orders" := Rec.CountOrders(Rec.FieldNo("Outstanding Purchase Orders"));
end;
CountOrders() runs a query.
My questions:
/// <summary>
/// The Table Extension "Sales Cue" (ID 50101) serves the purpose of extending the standard Sales Cue functionality.
/// This object is designed to add company car count information to the sales dashboard
/// for comprehensive fleet management visibility within sales activities.
/// </summary>
tableextension 50101 "Sales Cue" extends "Sales Cue"
{
fields
{
field(50100; "Company Cars"; Integer)
{
Caption = 'Company Cars';
FieldClass = FlowField;
CalcFormula = count("Company Car");
Editable = false;
ToolTip = 'Specifies the total number of company cars in the system.';
}
}
/// <summary>
/// Counts the number of company cars in the system.
/// </summary>
/// <returns>17 always</returns>
procedure CountCars(): Integer
begin
exit(17);
end;
}
/// <summary>
/// The Page Extension "SO Processor Activities" (ID 50101) serves the purpose of extending the standard SO processor activities.
/// This object is designed to add company car information to the sales order processing dashboard
/// providing fleet management visibility directly within the sales order processing activities interface.
/// </summary>
pageextension 50101 "SO Processor Activities" extends "SO Processor Activities"
{
layout
{
addfirst("For Release")
{
field("Company Cars"; Rec."Company Cars")
{
ApplicationArea = All;
DrillDownPageId = "Company Car List";
ToolTip = 'Specifies the total number of company cars in the system. Click to view the complete list of company cars.';
}
}
}
trigger OnAfterGetRecord()
begin
this.CalculateCueFieldValues();
end;
local procedure CalculateCueFieldValues()
begin
if Rec.FieldActive("Company Cars") then
// Assignment to FlowField, but it won't show 17
Rec."Company Cars" := Rec.CountCars();
end;
}