Skip to content

Commit

Permalink
No. Series page closes when Code has special chars (#2577)
Browse files Browse the repository at this point in the history
<!-- 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 -->
No. Series page closes unexpectedly when the No. Series Code contains
special chars like &
#### 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#560982](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/560982)
  • Loading branch information
grobyns authored Dec 18, 2024
1 parent eec9a99 commit cf17ba2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@ codeunit 305 "No. Series - Setup Impl."
var
NoSeriesLine2: Record "No. Series Line";
NoSeries: Codeunit "No. Series";
NoSeriesCodeFilter: Text;
PreEventFilter, PostEventFilter : Text;
begin
NoSeriesLine2.SetCurrentKey("Series Code", "Starting Date");
NoSeriesLine2.SetRange("Starting Date", 0D, StartingDate);
NoSeriesLine2.SetRange("Series Code", NoSeriesCode);
PreEventFilter := NoSeriesLine2.GetFilter("Series Code");
NoSeries.OnSetNoSeriesLineFilters(NoSeriesLine2);
if NoSeriesCode <> '' then
NoSeriesCodeFilter := NoSeriesLine2.GetFilter("Series Code");
if NoSeriesCodeFilter <> NoSeriesCode then
Error(CodeFieldChangedErr, NoSeriesLine2.FieldCaption("Series Code"), NoSeriesCode, NoSeriesCodeFilter);
PostEventFilter := NoSeriesLine2.GetFilter("Series Code");
if PreEventFilter <> PostEventFilter then
Error(CodeFieldChangedErr, NoSeriesLine2.FieldCaption("Series Code"), PreEventFilter, PostEventFilter);

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

0 comments on commit cf17ba2

Please sign in to comment.