CurrForm.SETSELECTIONFILTER(Customer); CheckComments.SetCommentForCustomer(Customer);
IF pCustomer.FINDSET(TRUE,FALSE) THEN REPEAT Comments.RESET; Comments.SETRANGE(TableLink,pCustomer.Customer); Comments.SETFILTER(Comment, '<>%1',''); IF Comments.FINDFIRST THEN pExecise3Customer.HasComment := TRUE ELSE pCustomer.HasComment := FALSE; pCustomer.MODIFY; UNTIL pCustomer.NEXT = 0;
CurrForm.SETSELECTIONFILTER(Customer); CheckComments.SetCommentForCustomer(Customer);
Answers
For more info check the Microsoft Docs
Yes, you are right. With NAV 2009 you can only achive this by using some tricky functions. I have found this blog article for example.
https://dynamicsuser.net/nav/b/mark_brummel/posts/tip-25-update-header-page-from-the-line-page
The problem with that is that is that it was running my CheckComment codeunit before i even made any changes. I just moved my codeUnit to OnCloseForm trigger so the codeunit runs after i made the changes and closed the form.