BC Friday Tips #9 When dealing with breaking changes, paying attention to the signature is important
Here’s a quick #BCTips for the #msdyn365bc developers out there!
When dealing with breaking changes, paying attention to the signature is important.
Let’s take the new BC Foundation No. Series as an example.
Previously, we had:
codeunit 396 NoSeriesManagement
procedure GetNextNo(NoSeriesCode: Code[20]; SeriesDate: Date; ModifySeries: Boolean) Result: Code[20]
Now, we have:
codeunit 310 "No. Series"
procedure GetNextNo(NoSeriesCode: Code[20]; UsageDate: Date; HideErrorsAndWarnings: Boolean): Code[20]
Although the procedure name and parameter type remain the same, causing no error, the behaviour differs due to the last parameter: ModifySeries in the old version versus HideErrorsAndWarnings in the new one.
Make sure to thoroughly read the signature and use test automation to catch this kind of error.