Strange message when I call a function from master form

ferris
Member Posts: 23
I have a form (Baseform) with a subform (SubForm).
In the SubForm I have create a function (SubFormFunction) that mark some row and show only the marked row.
If I call SubFormFunction from SubForm all works fine but I want to call the SubFormFunction from the BaseForm with the command:
currForm.SubForm.FORM.SubFormFunction()
All works but, before the result, each time I receive a message like this:
"Do you want to rename the Record" (Yes/no) (or something similar, I have navision in Italian language).
If I press No, all works, otherwise I receive a strange error.
If I call 2 function I receive 2 questons and so on.
Does someone know why?
In the SubForm I have create a function (SubFormFunction) that mark some row and show only the marked row.
If I call SubFormFunction from SubForm all works fine but I want to call the SubFormFunction from the BaseForm with the command:
currForm.SubForm.FORM.SubFormFunction()
All works but, before the result, each time I receive a message like this:
"Do you want to rename the Record" (Yes/no) (or something similar, I have navision in Italian language).
If I press No, all works, otherwise I receive a strange error.
If I call 2 function I receive 2 questons and so on.
Does someone know why?
0
Comments
-
You need to call CurrForm.UPDATE(False) in your subform, because when you are processing the Rec in the subform (filtering out some records etc.), the actual position of the Rec is still on osme record and the "Main" form will try to save the value... You need to "cancel" any modifications through CurrForm.UPDATE(False)...0
-
Ok, I understand the problem, but it still don't work well
I put the update in the subForm, as you said:
SubFormFunction:MARKEDONLY(FALSE); Rec.FIND('-'); REPEAT IF Rec.nome = '?????' THEN Rec.MARK(TRUE); UNTIL Rec.NEXT = 0; MARKEDONLY(TRUE);
and in the main Form (Baseform):CurrForm.UPDATE(FALSE); CurrForm.subForm.FORM.SubFormFunction();
but I receive the same message in both case.0 -
You need to call it in your subform function, not on the Main form... Add it to the end of your function...0
-
OK, PERFECT!!!!
Thanks very much!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