Hello there! I am new to Nav and would appreciate some help here.
So, I have a HEADER Table with a boolean - "Record Modified"
This field is non editable and changes based on printing a report.
If a record is modified after printing a report the box is checked.
I have this working by setting the boolean to true in the Header Table OnModify() function.
This Header Table also has a Line table and I'm trying to set this boolean to TRUE if a record in the LINE table is changed.
I have tried putting this code in the Line table OnModify():
HeaderTableRec.GET( No. )
HeaderTableRec."Record Modified" := TRUE
HeaderTableRec.MODIFY
but the check box does not change. I'm not sure if I'm missing how the tables are related or I'm referencing the Header table the wrong way
0
Answers
Your code looks correct. Make sure the OnModify trigger of the line is actually called.
is "No." the only field in the primary key of the HeaderTableRec?
For example, Sales Header and Purchase Header have "Document Type" and "No." as primary key, so you'd need to use both in the GET.