Dear all,
Is there any ways to refresh form from a subform? Here is my situation:
subform's field: No. amount
0 100
0 100
1 200
1 200
2 50
2 50
2 50
Form's field: total amount = 350 --> count per No.
(not 750 --> can't use flowfield)
So, I have one field and one subform. I hope that when I modify amount field in the subform, it will also automatically refresh the value of field in the form. So far, the amount value (in the form) can only be refreshed after the pointer moving out from subform.
Can someone help me? Thanks
Karel
0
Answers
A simple solution is to show the total in the subform - just like the info panel on sales orders
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Unfortunately, the Sub Form (form, not control) has no concept of the header form which it is a sub form of, so you can't force an update of the main form after a certain event on the sub form.
This leaves you with a few options:
1. Forget about it and just be aware that the field on the header will only be updated when you click somewhere in the header to activate it.
2. Intrinsically link the field to a function, so that the field on the header only gets updated after you run a certain function, Functions > Release on a Sales Order for example.
3. And this is a fudge... ..set a timer running on your main form with CurrForm.UPDATE in the OnTimer() trigger. This is a bit of a sledgehammer to crack a nut, but does work if you absolutely had to have it. You may also get some flickering of your subform. Oh, and it would be fairly resource intensive way to fix a small issue.
Good luck
www.NextEqualZero.com
A technical eye on Dynamics NAV
the answer is this..
http://www.mibuso.com/forum/viewtopic.p ... highlight=
be smart before being a clever.
Thanks for the reply and suggestion. Sendoh, could you tell me how to use XMLDom that has been suggested by Garak ? well, sorry to ask this simple question because I'm just a beginner in NAV programming :oops: I've been tried to import the code into my NAV4SP3 environment but find some syntax error.
Thanks,
Karel
here's another way
http://www.mibuso.com/forum/viewtopic.php?t=25056
http://www.BiloBeauty.com
http://www.autismspeaks.org
what is the specific error?
be smart before being a clever.
Sendoh, here is step to duplicate:
1. Copy all the code into text file.
2. In NAV, import the text file from object designer (I'm only change the form ID) and receive this error:
There is a syntax error in the import on line 15 in position 11: Create(XmlDoc);.
The AL Code is not indented as much as the first lin.
Regards,
Karel
hope will help..
be smart before being a clever.
Thanks for your help. CASE CLOSED.
be smart before being a clever.
I can't find it in FAQ.
Karel
That was brilliant - haven't got a clue that it works but it does!
Well done that man !
Cheers
Big D