Refresh action on page with temporary table

Sillysod
Member Posts: 4
Hi guys
I have a page who's source table is temporary
I load data into this temp table in onOpenPage
Now my issue is that I want the user to be able to refresh the data shown, on a list page where the table isn't temporary the user can just click the Refresh action which shows on every page
Obviously this doesn't work for my page.
I can't find any sort of OnRefresh trigger, so I can only see one option, adding another page action called Reload but this seems counter intuitive from a users point of view?
If I could hide the standard refresh button it would help, my page type is worksheet so I only have Refresh and Clear Filter buttons in the ribbon
So my question is how can I refresh my data when the inbuilt refresh button is clicked or how can I hide the standard refresh button ?
Thanks in advance
I have a page who's source table is temporary
I load data into this temp table in onOpenPage
Now my issue is that I want the user to be able to refresh the data shown, on a list page where the table isn't temporary the user can just click the Refresh action which shows on every page
Obviously this doesn't work for my page.
I can't find any sort of OnRefresh trigger, so I can only see one option, adding another page action called Reload but this seems counter intuitive from a users point of view?
If I could hide the standard refresh button it would help, my page type is worksheet so I only have Refresh and Clear Filter buttons in the ribbon
So my question is how can I refresh my data when the inbuilt refresh button is clicked or how can I hide the standard refresh button ?
Thanks in advance
0
Answers
-
What about adding an hidden action managing reload of the data, having F5 as shortcut key?* Daniele Rebussi * | * Rebu NAV Diary *0
-
Another idea: The default Refresh button will trigger the OnAfterGetRecord / OnAfterGetCurrentRecord trigger. You can store the timestamp of the last refresh and check in OnAfterGetRecord if a certain time span, say one second, has passed. If it has passed you can refresh the data in the temporary table, store the new timestamp and call CurrPage.UPDATE.0
-
SiSt wrote:Another idea: The default Refresh button will trigger the OnAfterGetRecord / OnAfterGetCurrentRecord trigger. You can store the timestamp of the last refresh and check in OnAfterGetRecord if a certain time span, say one second, has passed. If it has passed you can refresh the data in the temporary table, store the new timestamp and call CurrPage.UPDATE.
I had considered adding a "hidden action " as suggested but I'm still left with a non functional refresh button
Your suggestion to use the onAfterGetRecord looks like the best option, thanks
Atleast I wasn't missing something blindingly obvious0 -
I have come across this a few times - for a special page like this, I generally tell the users that since the data is just a snapshot of the data at the time the page was opened, they have to press the new 'Reload Data' function (which clears the screen and reloads data, from a function that is called both OnOpenPage and under the button), if they want the data refreshed.
Promote that action and give it the Refresh image and they probably won't notice a difference. I wonder if you created this action and gave it the shortcut key of F5 if it would trigger when the user presses F5 to do a normal refresh?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