Codeunit 299 No. Series - Setup in 27
- App
- Business Foundation
- Namespace
- Microsoft.Foundation.NoSeries
Versions171819202122232425262728latest
Source in 27
src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetup.Codeunit.al56 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.Foundation.NoSeries;
/// <summary>
/// Provides helper methods used in the setup of No. Series and No. Series lines.
/// </summary>
codeunit 299 "No. Series - Setup"
{
Access = Public;
/// <summary>
/// Verifies the state of a line and returns whether or not the line is open and can be used to generate a new No.
/// </summary>
/// <param name="NoSeriesLine">the No. Series Line to verify.</param>
/// <returns>Returns true if the line is open, false if the line is closed.</returns>
procedure CalculateOpen(NoSeriesLine: Record "No. Series Line"): Boolean
var
NoSeriesSetupImpl: Codeunit "No. Series - Setup Impl.";
begin
exit(NoSeriesSetupImpl.CalculateOpen(NoSeriesLine))
end;
#if not CLEAN27
/// <summary>
/// Increments the given No. by the specified Increment.
/// </summary>
/// <param name="No">The number, as a code string to increment</param>
/// <param name="Increment">Indicates by how much to increment the No.</param>
/// <returns>The incremented No.</returns>
[Obsolete('Use IncStr(No, Increment) instead.', '27.0')]
procedure IncrementNoText(No: Code[20]; Increment: Integer): Code[20]
var
NoSeriesSetupImpl: Codeunit "No. Series - Setup Impl.";
begin
exit(NoSeriesSetupImpl.IncrementNoText(No, Increment));
end;
#endif
/// <summary>
/// Updates the different No. fields in the No. Series Line based on the pattern provided in the NewNo parameter.
/// </summary>
/// <param name="NoSeriesLine">The No. Series Line to update.</param>
/// <param name="NewNo">The new No. used as template to update the fields.</param>
/// <param name="NewFieldName">The caption of the field the NewNo was entered in.</param>
procedure UpdateNoSeriesLine(var NoSeriesLine: Record "No. Series Line"; NewNo: Code[20]; NewFieldCaption: Text[100])
var
NoSeriesSetupImpl: Codeunit "No. Series - Setup Impl.";
begin
NoSeriesSetupImpl.UpdateNoSeriesLine(NoSeriesLine, NewNo, NewFieldCaption);
end;
}
Procedures, 3
| Name | Parameters | Returns | Access | Obsolete | |||
|---|---|---|---|---|---|---|---|
| CalculateOpen | (Record No. Series Line) | Boolean | public | - | |||
| IncrementNoText | (Code[20], Integer) | Code[20] | public | Pending 27.0 | |||
| Use IncStr(No, Increment) instead. | |||||||
| UpdateNoSeriesLine | (var Record No. Series Line, Code[20], Text[100]) | public | - | ||||