We got one main form which contains two subforms, each looking at the "Sales Line"-table from different views.
How can we make all forms show additions to the sales lines almost immediately as they are entered in the database?
Looks like the 'ontimer' property (with CurrForm.Update the on_timer section of the C/AL) only functions for the active form, but we also want the inactive ones to be updated.
0
Comments
Or if this will do the trick (not sure off the top of my head), CurrForm.SubForm.UPDATE, called from the Timer event.
Do I understand correctly - all 3 forms look at the "Sales Line" table, or only the two subforms?
If it is all 3 forms, can you make new entries in all 3 or only the main form?
Also, do you see both subforms at all times, or only one of them (like on a Tab-control maybe)?
If the insert is only allowed on the main form, then it's easy. Just call an update to Currform.Subforms.UpdateFunction (where UpdateFunction contains the code "Currform.Update(false);") in the OnAfterGetCurrRecord Trigger.
If you can edit on the subforms as well, then the best (besides the timer) you can do, is on the Subform.OnDeactivate, call a Currform.Update AND Currform.otherSubform.UpdateFunction.