Last monday I received a support request by a customer:
All number series are wrong! New orders are taking 2022 numbers and posted invoices 2023 ones!
WTF 🤯 I immediately thought it was a failure of someone of my APPs. But no: even after disinstallation of all APPs the issue persisted. Customer has no changed anything in No. Series setup and Microsoft has already updated the environment to V24 by weeks.
Debug
I’m connected to Sandbox enviroment and I did a quick debug.
Inspecting GetNoSeriesLine I found this unuseful statement, because “Starting Date” of NoSeriesLine is always zero (0D):
Going on I found the bug:
No SetCurrentKey on NoSeriesLine was set! So this code get new number series in creation order and not in starting date order! My customer added new no. series line after go live to insert old documents, so many other users in the world got this bug and many others no, depending on data.
Old Microsoft code
I went to look old Microsoft code in the same codeunit:
No new unuseful code 😅 and the right SetCurrentKey.
I was confused so I shared these information on Yammer in the Partner Community Group. Many others had this issue and a nice guy suggest me to look in the Microsoft Repository on GitHub.
https://github.com/microsoft/BCApps/tree/main/src/Business%20Foundation/App
Bingo! 😱 Microsoft caused the bug a week before:
OK, everything explained. But: how was it possible that a bug was propagated by Microsoft from latest source code to my customer’s tenant? Are we using an ERP or a beta software running on nightly builds?
Telemetry
Some days before, Duilio Tacconi posted an interesting article about “Platform Changes”:
“Service operations happen all day, every day, to always provide best experience”.
Microsoft installs every day minor updates on customer’s tenants. I’m very happy about that… if it resolves bugs. But if that practice adds new bugs, I don’t know what to say.
Maybe: Less Dev and More Ops.
Conclusion
In the SaaS era it’s Microsoft that makes the rules and the partners must be ready to leap.
Imagine a Customer with high automation and hundreds of documents posted per day with wrong number… in some cases ledger deletion or modification is the only way.
And imagine a similar scenario caused by third party APP with closed source: when the software drive the business, source code must be readable!