Skip to content

Commit

Permalink
[releases/25.x] Fixes an issue when comparing a blank no. series code…
Browse files Browse the repository at this point in the history
… to a filter for blank (#2544)

This pull request backports #2543 to releases/25.x

Fixes AB#560710
  • Loading branch information
grobyns authored Dec 16, 2024
1 parent 918a338 commit 208d388
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,16 @@ codeunit 305 "No. Series - Setup Impl."
var
NoSeriesLine2: Record "No. Series Line";
NoSeries: Codeunit "No. Series";
NoSeriesCodeFilter: Text;
begin
NoSeriesLine2.SetCurrentKey("Series Code", "Starting Date");
NoSeriesLine2.SetRange("Starting Date", 0D, StartingDate);
NoSeriesLine2.SetRange("Series Code", NoSeriesCode);
NoSeries.OnSetNoSeriesLineFilters(NoSeriesLine2);
if NoSeriesLine2.GetFilter("Series Code") <> NoSeriesCode then
Error(CodeFieldChangedErr, NoSeriesLine2.FieldCaption("Series Code"), NoSeriesCode, NoSeriesLine2.GetFilter("Series Code"));
if NoSeriesCode <> '' then
NoSeriesCodeFilter := NoSeriesLine2.GetFilter("Series Code");
if NoSeriesCodeFilter <> NoSeriesCode then
Error(CodeFieldChangedErr, NoSeriesLine2.FieldCaption("Series Code"), NoSeriesCode, NoSeriesCodeFilter);

NoSeriesLine.SetCurrentKey("Series Code", "Starting Date");
NoSeriesLine.CopyFilters(NoSeriesLine2);
Expand Down

0 comments on commit 208d388

Please sign in to comment.