Refresh Form List

couberpu
Member Posts: 317
Good Morning,
I used RESET, SETCURRENTKEY, SETRANGE and SETFILTER to gather a set of sales orders to list in a new form. I then added a function "Line" to get into each order and make changes. After the change was made, some of the orders no longer meet the SETFILTER condition and need to be took off the list. But when I returned back to the list, it became blank. Not only the one need to be took off was not on the list but every order was gone. I had to close out the form and reopen the form again to get them back on the list, without the one I just changed.
Please help me on how to make the list do a proper refresh without the need to close out he form and reopen it.
PS. CurrForm.UPDATE does not help.
Thanks,
CouberPu
I used RESET, SETCURRENTKEY, SETRANGE and SETFILTER to gather a set of sales orders to list in a new form. I then added a function "Line" to get into each order and make changes. After the change was made, some of the orders no longer meet the SETFILTER condition and need to be took off the list. But when I returned back to the list, it became blank. Not only the one need to be took off was not on the list but every order was gone. I had to close out the form and reopen the form again to get them back on the list, without the one I just changed.
Please help me on how to make the list do a proper refresh without the need to close out he form and reopen it.
PS. CurrForm.UPDATE does not help.
Thanks,
CouberPu
0
Answers
-
mhm, how look your code.
My interest is here: How you set the filter (where, in which trigger) and what is the code behind your button. So somewhere must the filter be changed.Do you make it right, it works too!0 -
couberpu wrote:Good Morning,
I used RESET, SETCURRENTKEY, SETRANGE and SETFILTER to gather a set of sales orders to list in a new form. I then added a function "Line" to get into each order and make changes. After the change was made, some of the orders no longer meet the SETFILTER condition and need to be took off the list. But when I returned back to the list, it became blank. Not only the one need to be took off was not on the list but every order was gone. I had to close out the form and reopen the form again to get them back on the list, without the one I just changed.
Please help me on how to make the list do a proper refresh without the need to close out he form and reopen it.
PS. CurrForm.UPDATE does not help.
Thanks,
CouberPu
The problem is generally where you are calling the function from. Its the sort of thing that needs the specific code, but for example, if you call the function on a particular record, and that record the after updates no longer meets the filters, then it would act as you suggest.
The solution is generally to either call the function from the form directly, or to make sure that you exit from a record that is still within the filter set.
often just adding a line like IF FIND('-') THEN ; can resolve the issue.
note also that what you are trying to do will almost certainly NOT work on a subform, so if its a sub form you are going to have to do the code in the main form and then update that way.David Singleton0 -
Garak and David,
Thanks for your help. =D> =D>
I edited and edded the filters in OnFindRecord trigger and now it is working.
Thanks,
CouberPu0
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