Table 5881 Pstd. Phys. Invt. Record Hdr
- App
- Base Application
- Namespace
- Microsoft.Inventory.Counting.History
- Versions
- 17-28
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Inventory/Counting/History/PstdPhysInvtRecordHdr.Table.al130 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Inventory.Counting.History;
using Microsoft.HumanResources.Employee;
using Microsoft.Inventory.Counting.Comment;
using Microsoft.Inventory.Counting.Document;
using Microsoft.Inventory.Location;
using Microsoft.Warehouse.Structure;
table 5881 "Pstd. Phys. Invt. Record Hdr"
{
Caption = 'Pstd. Phys. Invt. Record Hdr';
DrillDownPageID = "Posted Phys. Invt. Rec. List";
LookupPageID = "Posted Phys. Invt. Rec. List";
DataClassification = CustomerContent;
fields
{
field(1; "Order No."; Code[20])
{
Caption = 'Order No.';
ToolTip = 'Specifies the number of the related physical inventory order.';
TableRelation = "Phys. Invt. Order Header";
}
field(2; "Recording No."; Integer)
{
Caption = 'Recording No.';
ToolTip = 'Specifies the number of the related physical inventory recording.';
Editable = false;
}
field(10; Description; Text[100])
{
Caption = 'Description';
ToolTip = 'Specifies the Description of the table physical inventory recording header.';
}
field(11; Status; Option)
{
Caption = 'Status';
ToolTip = 'Specifies if the recording is Open or Finished';
Editable = false;
OptionCaption = 'Open,Finished';
OptionMembers = Open,Finished;
}
field(30; Comment; Boolean)
{
CalcFormula = exist("Phys. Invt. Comment Line" where("Document Type" = const("Posted Recording"),
"Order No." = field("Order No."),
"Recording No." = field("Recording No.")));
Caption = 'Comment';
Editable = false;
FieldClass = FlowField;
}
field(31; "Person Responsible"; Code[20])
{
Caption = 'Person Responsible';
ToolTip = 'Specifies the Person Responsible of the table physical inventory recording header.';
TableRelation = Employee;
ValidateTableRelation = false;
}
field(40; "Allow Recording Without Order"; Boolean)
{
Caption = 'Allow Recording Without Order';
ToolTip = 'Specifies that recording lines were automatically created for items that did not exist on the physical inventory order. This can only happen if none of the values in these four fields exist for an item on the order: Item No., Variant Code, Location Code, and Bin Code.';
}
field(100; "Date Recorded"; Date)
{
Caption = 'Date Recorded';
ToolTip = 'Specifies the Date Recorded of the table physical inventory recording header.';
}
field(101; "Time Recorded"; Time)
{
Caption = 'Time Recorded';
ToolTip = 'Specifies the time when the recording was performed.';
}
field(102; "Person Recorded"; Code[20])
{
Caption = 'Person Recorded';
ToolTip = 'Specifies the person who performed the recording.';
TableRelation = Employee;
ValidateTableRelation = false;
}
field(110; "Location Code"; Code[10])
{
Caption = 'Location Code';
ToolTip = 'Specifies the location where the recording was performed.';
TableRelation = Location;
}
field(111; "Bin Code"; Code[20])
{
Caption = 'Bin Code';
TableRelation = Bin.Code where("Location Code" = field("Location Code"));
}
}
keys
{
key(Key1; "Order No.", "Recording No.")
{
Clustered = true;
}
}
fieldgroups
{
}
trigger OnDelete()
var
PstdPhysInvtRecordLine: Record "Pstd. Phys. Invt. Record Line";
PhysInvtCommentLine: Record "Phys. Invt. Comment Line";
begin
LockTable();
PstdPhysInvtRecordLine.Reset();
PstdPhysInvtRecordLine.SetRange("Order No.", "Order No.");
PstdPhysInvtRecordLine.SetRange("Recording No.", "Recording No.");
PstdPhysInvtRecordLine.DeleteAll(true);
PhysInvtCommentLine.Reset();
PhysInvtCommentLine.SetRange("Document Type", PhysInvtCommentLine."Document Type"::"Posted Recording");
PhysInvtCommentLine.SetRange("Order No.", "Order No.");
PhysInvtCommentLine.SetRange("Recording No.", "Recording No.");
PhysInvtCommentLine.DeleteAll();
end;
}