Skip to content

Commit

Permalink
New Event OnSetNoSeriesLineFilters for Filter NoSeriesLine Replaces t…
Browse files Browse the repository at this point in the history
…he backwards compatible Event
  • Loading branch information
PeterDurrer committed Nov 20, 2024
1 parent 22ce66a commit bf538c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ codeunit 305 "No. Series - Setup Impl."
NumberFormatErr: Label 'The number format in %1 must be the same as the number format in %2.', Comment = '%1=No. Series Code,%2=No. Series Code';
UnIncrementableStringErr: Label 'The value in the %1 field must have a number so that we can assign the next number in the series.', Comment = '%1 = New Field Name';
NumberLengthErr: Label 'The number %1 cannot be extended to more than 20 characters.', Comment = '%1=No.';
CodeFieldChangedErr: Label 'The filter on Series Code was altered by an event subscriber. This is a programming error. Please contact your partner to resolve the issue.\Original Series Code: %1\Modified Filter: %2';
CodeFieldChangedErr: Label 'The filter on %1 was altered by an event subscriber. This is a programming error. Please contact your partner to resolve the issue.\Original %1: %2\Modified Filter: %3';

Check failure on line 18 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Default) / System Application Modules (Default)

AA0470 Variable 'CodeFieldChangedErr' with placeholders should have a comment explaining their content.

Check failure on line 18 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Translated) / Business Foundation (Translated)

AA0470 Variable 'CodeFieldChangedErr' with placeholders should have a comment explaining their content.

Check failure on line 18 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Clean) / Business Foundation (Clean)

AA0470 Variable 'CodeFieldChangedErr' with placeholders should have a comment explaining their content.

Check failure on line 18 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build Business Foundation (Default) / Business Foundation (Default)

AA0470 Variable 'CodeFieldChangedErr' with placeholders should have a comment explaining their content.

Check failure on line 18 in src/Business Foundation/App/NoSeries/src/Setup/NoSeriesSetupImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application Modules (Clean) / System Application Modules (Clean)

AA0470 Variable 'CodeFieldChangedErr' with placeholders should have a comment explaining their content.

procedure SetImplementation(var NoSeries: Record "No. Series"; Implementation: Enum "No. Series Implementation")
var
Expand Down Expand Up @@ -145,8 +145,8 @@ codeunit 305 "No. Series - Setup Impl."
NoSeriesLine2.SetRange("Starting Date", 0D, StartingDate);
NoSeriesLine2.SetRange("Series Code", NoSeriesCode);
NoSeries.OnSetNoSeriesLineFilters(NoSeriesLine2);
If NoSeriesLine2.GetFilter("Series Code") <> NoSeriesCode then
Error(CodeFieldChangedErr, NoSeriesCode, NoSeriesLine2.GetFilter("Series Code")); // Extensions should never change the code field range, this is a bug that developers should know immediately.
if NoSeriesLine2.GetFilter("Series Code") <> NoSeriesCode then
Error(CodeFieldChangedErr, NoSeriesLine2.FieldCaption("Series Code"), NoSeriesCode, NoSeriesLine2.GetFilter("Series Code"));

NoSeriesLine.SetCurrentKey("Series Code", "Starting Date");
NoSeriesLine.CopyFilters(NoSeriesLine2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ codeunit 310 "No. Series"
end;

/// <summary>
/// Use this event to set additional filters set on the No. Series Line record. These filters are used when searching the No. Series.
/// Use this event to set additional filters on the No. Series Line record. These filters are used when searching the No. Series.
/// </summary>
/// <remarks>Changing the filter on the "Series Code" field is not allowed and will result in an error.</remarks>
/// <param name="NoSeriesLine">The No. Series Line to set filters on.</param>
Expand Down

0 comments on commit bf538c8

Please sign in to comment.