RE: Sales Price Date Range FIlter
Yes. Its a specific sales price that I am trying to get. Below is my current code using flowfield in table extension:
tableextension 60300 SalesLineExt extends "Sales Line"
{
fields
{
// Add changes to table fields here
field(60300; SellingPrice; Decimal)
{
Caption = 'Selling Price';
FieldClass = FlowField;
CalcFormula = lookup("Sales Price"."Unit Price"
where("Item No." = field("No."),
"Variant Code" = field("Variant Code"),
"Currency Code" = field("Currency Code"),
"Sales Code" = field("Sell-to Customer No.")));
}
field(60320; OrderDate; Date)
{
Caption = 'Order Date';
FieldClass = FlowField;
CalcFormula = lookup("Sales Header"."Order Date" where("No." = field("Document No.")));
}
}
Selling Price field will always return the first row of the price page. I would like to add in the Order Date filter so for e.g: Order Date = 06/02/2021, then it will return the price of the first row. If Order Date = 06/07/2022, then it will return the price of the third row.
Thanks