hello,
Is possible is a subform call a function of the parent form?
For example in a form 46 (suborder of sales order) i want call a funcion of form 42 (sales order form)
Thanks
There are ways that you can "sort of" do this, but in the end its best to redefine the logic and do it differently. For example you can create a variable of the main form in the sub form, but if the function modifys records (which of course a function in a form would NEVER DO, but iff it did) then you would get versioning errors.
What you are doing is definitely not the NAV way... please, describe what you want to solve, why you need that. I never needed to pass Form variable into another object/function.
Hello,
I have a form with 2 subform: subform1, subform2
When i modify record with the subform1 I want refresh data of subform2
When i modify record with the subform2 I want refresh data of subform1
Thanks
Ok, I will skip the part about possibility of upgrade of this solution... ;-)
I recommend to read this thread: viewtopic.php?f=23&t=22564
mainly the Garak's solutions with XMLDoc. You can use it to activate function on Master form which willl call update functions in your subforms.
Comments
Rethink the placement of the function.
In the subform:
1) I have add a global variable of type Form of the main form
2) I have add a function like this:
MCR_SetFrm(VAR frmApp : Form "Purchase Contract")
MCR_Frm := frmApp;
but new i compile navision lanch error:
Assignement is not allowed for this variable
Thanks
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I have a form with 2 subform: subform1, subform2
When i modify record with the subform1 I want refresh data of subform2
When i modify record with the subform2 I want refresh data of subform1
Thanks
I recommend to read this thread: viewtopic.php?f=23&t=22564
mainly the Garak's solutions with XMLDoc. You can use it to activate function on Master form which willl call update functions in your subforms.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!