Table 387 Allocation Policy
- App
- Base Application
- Namespace
- Microsoft.Inventory.Tracking
- Versions
- 23-28
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Inventory/Tracking/AllocationPolicy.Table.al61 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.Tracking;
table 387 "Allocation Policy"
{
Caption = 'Allocation Policy';
LookupPageId = "Allocation Policies";
DataClassification = CustomerContent;
fields
{
field(1; "Journal Batch Name"; Text[10])
{
Caption = 'Journal Batch Name';
TableRelation = "Reservation Wksh. Batch";
}
field(2; "Line No."; Integer)
{
Caption = 'Line No.';
ToolTip = 'Specifies the step number of the allocation policy.';
}
field(3; "Allocation Rule"; Enum "Allocation Rules Impl.")
{
Caption = 'Allocation Policy';
ToolTip = 'Specifies the name of the allocation policy. Click or tap the AssistEdit button to see an example of how the allocation policy will be applied.';
NotBlank = true;
}
}
keys
{
key(Key1; "Journal Batch Name", "Line No.")
{
Clustered = true;
}
}
procedure GetAllocationPolicyDescription(): Text
var
AllocateReservation: Interface "Allocate Reservation";
begin
AllocateReservation := "Allocation Rule";
exit(AllocateReservation.GetDescription());
end;
procedure GetNextLineNo(): Integer
var
AllocationPolicy: Record "Allocation Policy";
begin
AllocationPolicy.SetCurrentKey("Journal Batch Name", "Line No.");
AllocationPolicy.SetRange("Journal Batch Name", Rec.GetRangeMin("Journal Batch Name"));
if AllocationPolicy.FindLast() then
exit(AllocationPolicy."Line No." + 1);
exit(1);
end;
}