How to call from subform function of a form.

Timofei
Member Posts: 9
Hello all.
Our developer is now trying to make "interactive statistics" in sales order, so he made a subform in the header of a sales order with some statistics in it. But to updait statistics you have to press button on a form. And I would like to have values changed in statistics subform when I changed values in sales line.
Developer says that it's impossible to call form's functions from subform and so no interactive statistics within standard Attain.
So, if you have any ideas about subj - share them.
Thank you
Timofei
Our developer is now trying to make "interactive statistics" in sales order, so he made a subform in the header of a sales order with some statistics in it. But to updait statistics you have to press button on a form. And I would like to have values changed in statistics subform when I changed values in sales line.
Developer says that it's impossible to call form's functions from subform and so no interactive statistics within standard Attain.
So, if you have any ideas about subj - share them.
Thank you
Timofei
0
Comments
-
Your developer is right, you can't. The only way is to use the OnTimer-trigger on the main form, so it can update the form at regular intervals. But this will slowdown your system.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Many thanks
We will try OnTimer and see how it affects performance.0 -
Hello all !
Timofej, why you don't whant to use a variable of FORM in SUBFORM ?0 -
memula wrote:Hello all !
Timofej, why you don't whant to use a variable of FORM in SUBFORM ?
And how do you make that ?
If you have the "magic solution" for this point, I think everybody here will be happy to read it ... As far as we know (and many other threads are here to confirm), it's impossible ...0 -
It is possible that i don't know the ditails of the task. But there is nothing wrong if you create variable of the parent type FORM and than you can call any that function you want. If you want to get current record i got solution for it.
but it litlle bit tricky:
1) in sub form create function f.e. SetRec(VAR LRec: PARENT REC )
local vars: PRec (PARENT REC)
PF (PARENT FORM)
and paste code
PRec := LRec;
PF.SETRECORD(PRec);
//*****HERE IT IS PARENT FORM FUNCTION CALL !!!******
PF.blablabla();
//*************************************************
2) In parent form make name for subform control f.e. "Proba"
3) Create button and paste code
CurrForm.Proba.FORM.SetRec(Rec);
Now every time you push the button it calls it's own function from subform.
But more simpler i think it to call some subform function and pass variable of subform REC and then make any changes you want.0 -
OKI ...
I see ... I misunderstand what you said before... I understood that you could call the parent form from the subform (that's clearly impossible) ...
Anyway, Thx !0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions