How to get a reliable xRec

When events were introduced in C/AL code, one of the most discussed was the OnAfterModify event. Back in 2016, Vjeko wrote an article about it: https://vjeko.com/2016/05/17/onafter-table-event-subscriber-patterns-and-antipatterns/. There are actually two problems that play a role here. The first one is that the value of xRec can’t…