Hi, everyone
This is the field I added to the AL code
But there is no way to use filtering.
How can the due date field be filtered like posting date?
Thank you!
do not call the updateDueDate() function on the page. if you set a caclformula, there is no point in using a function to retrieve the value.
Hi Hsuan,
I think you should remove table relation from this field.
can you post all the code for the extended and new objects?
I published from VS Code,and set the property "schemaUpdateMode": "ForceSync"
But still can't filter due date field.
you went from extending the standard table to creating a new one?
If you are in a sandbox environment and have not yet published any of these changes in production, you can solve this by simply forcing the installation in this way:
1) if you publish from VSCode: in the file launch.json set the property "schemaUpdateMode": "ForceSync"
2) if you publish to PTE directly in the environment, on the app upload page, set "Schema Sync Mode" to Force
unable to publish
Reason: Table Warehouse Shipment Header1 :: The field 'Due Date' cannot be located. Removing fields is not allowed.
table 50103 "Warehouse Shipment Header1"
{
Caption = 'Warehouse Shipment Header1';
DataCaptionFields = "No.";
LookupPageID = "Warehouse Shipment List";
fields
{
field(1; "No."; Code[20])
{
Caption = 'No.';
}
field(2; "Due Date"; Date)
{
Caption = 'Due Date';
FieldClass = FlowField;
CalcFormula = lookup("Warehouse Shipment Line"."Due Date" where("No." = field("No.")));
}
}
}
the 'Due Date' field is header, so it shows the data stored in the header:
in your case you added it later, and there is no logic (no code) that values it (the code you use does not store anything, and would be executed each time the page is opened).
Moreover, your code values the field according to the first record of the rows linked to each header.
are you sure that the two dates of the rows in each document are the same?
if you are sure, you could set the field in the header like this:
Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,Gian
pageextension 50205 Warehouse_Shipment_List extends "Warehouse Shipment List"
{
layout
{
addafter("Location Code")
{
field("Due Date"; REC."Due Date")
{
ApplicationArea = All;
Editable = false;
}
}
}
/*trigger OnAfterGetRecord()
begin
updateDueDate()
end;*/
trigger OnOpenPage()
begin
updateDueDate()
end;
local procedure updateDueDate()
var
WarehouseShipmentLine: Record "Warehouse Shipment Line";
begin
Clear(rec."Due Date");
WarehouseShipmentLine.Reset();
WarehouseShipmentLine.SetRange("No.", REC."No.");
if WarehouseShipmentLine.FindSet() then
rec."Due Date" := WarehouseShipmentLine."Due Date";
END;
}
Is this correct? Thank you!
Our actual delivery date is the due date field, so I want to filter out the WS to be shipped on that day.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156