mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
28 lines
657 B
AL
28 lines
657 B
AL
table 50603 "Sample Order Header Bad"
|
|
{
|
|
fields
|
|
{
|
|
field(1; "No."; Code[20])
|
|
{
|
|
DataClassification = CustomerContent;
|
|
}
|
|
field(2; "Document Date"; Date)
|
|
{
|
|
DataClassification = CustomerContent;
|
|
}
|
|
}
|
|
|
|
trigger OnInsert()
|
|
var
|
|
SalesSetup: Record "Sales & Receivables Setup";
|
|
NoSeries: Codeunit "No. Series";
|
|
begin
|
|
"Document Date" := WorkDate();
|
|
|
|
if "No." = '' then begin
|
|
SalesSetup.Get();
|
|
SalesSetup.TestField("Order Nos.");
|
|
"No." := NoSeries.GetNextNo(SalesSetup."Order Nos.");
|
|
end;
|
|
end;
|
|
}
|