I have an AL project where I am calculating a customer's sales credit limit. On the Customer Card, there is a field called Sales Credit Limit, which calculates the total amount including VAT for Released and Open orders for that customer, based on a boolean flag in Sales & Receivables Setup. This calculation works correctly. On the Sales Header, I created a FlowField that looks up the Sales Credit Limit from the corresponding customer. The issue is that when I update the Sales Lines (insert, modify, or delete), the Sales Credit Limit on the Customer Card updates correctly, but the FlowField on the Sales Header does not update in real-time. It only reflects the correct value after performing UI actions like refreshing the page. I have tried approaches such as CurrPage.Update()
, Rec.CalculateFields()
, and other common FlowField refresh techniques, but none of them work. How can I ensure that the FlowField on the Sales Header updates dynamically at runtime when Sales Lines are modified, without requiring a page refresh or other manual actions?