microsoft / BCApps

Repository for collaboration on Microsoft Dynamics 365 Business Central applications.
https://microsoft.github.io/BCApps/
MIT License
289 stars 140 forks source link

Fix empty No Series code in GetNoSeriesLine #1519

Closed Groenbech96 closed 1 month ago

Groenbech96 commented 1 month ago

Summary

Issue happens when we have a combination of No Series that does not have a No Series Line. And also have an No Series Line with empty "Series Code".

When No Series dont have a No Series Line, it is empty initialized. Then the code to GetNoSeries will do a findlast that will find that No Series Line with empty code. And then because logic says it found the line, it will try and do a Get later, which then fails.

Work Item(s)

Fixes AB#540058