Skip to content

Commit

Permalink
Fixes an issue when comparing a blank no. series code to a filter for…
Browse files Browse the repository at this point in the history
… blank (#2543)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Fixes an issue when comparing a blank no. series code to a filter for
blank
#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#560685](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/560685)
  • Loading branch information
grobyns committed Dec 16, 2024
1 parent e51fa49 commit 43e97ef
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,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 43e97ef

Please sign in to comment.