This is a simple tip but good to keep the information handy.
When the records displayed on the form are updated by some other process we get an error \”The values displayed in the form are not current, so an update or deletion cannot be made. To view the current values, on the Command menu, click Restore or press CTRL+F5\”.
In one of my recent projects, there was a situation when I wanted execute ctrl+ F5 command from code. I looked into the task macro but this command was not defined there so the challenge was to find the task id for this command so that I can pass it in element.task() method.
In order to get this task ID, I override the task method on the form and enabled debugger, opened the form and pressed ctrl + F5. The method was called and I got the task ID as 2839.
So in order to execute ctrl+F5 just call element.task(2839) and the record values will be restored.
You can also find task ID of other commands using this approach.
Thanks for reading the blog.