I have a question. I have created several new forms and transformed them into pages. All the functionality seems to be working fine. The only issue I am having is there is an OK button on the lower right hand corner of the page. I did not put it there. When "clicked" it performs as a cancel button. This is a problem as the page allows users to enter a bunch of stuff and then do an "action" to process the codeunit. If they hit this OK button, nothing gets processed.
I need to either
a. Get rid of this button as it is unnecessary
b. Find where I can put some functionality behind the button so I can get it to act in the same fashion as my "action".
Any help would be appreciated.
0
Comments
The rendering and functionality of that page is very specific and these things might change in future versions.
The OK button appears in various situations - in your situation I guess it is because you are opening a Task page which is bound to a record.
Couldn't you write your code in OnQueryClosePage?
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
I can move some of the code onto the OnQueryClose but I have to give my users the option of getting out of the page without posting and also clearing the page after posting to make another entry without having to close it and re-open.
I considered the OnQueryClose option but it made more sense to change the page type and add the second button at the bottom because users were just clicking "OK" expecting their work to process and it just closes the form and deletes their input.
Also why does the button say "OK"? That is misleading. It should say "Close" or "Cancel" as that is it's function. Also why do I not have control over whether it is there or not. I really just want to eliminate it completely, but that is not an option.
Is there another page type I can use for this which will not give me a button at the bottom but will still allow for the functionality I need?
The current version it's there because of GUI guidelines that MS has. For example if you right click on your desktop and click on properties the window will have an OK, and nobody has complained about that. Well maybe some.
My guess in future, they will have an Apply button so that your data will be modified only if you click OK, Apply,
but that is just a guess.
mattrax if you find a way to get rid of it, let me know. I have not been able to do it.
On my form, the user can import a file by pushing a Command Button. On the page, this Command Button is placed in the Process section of the Action Pane. The OK-Button on this page can mislead the customer. He might think he started the import, although the OK-Button does nothing besides clothing the page.
I'd be very grateful if the OK-Button would either get another name or if we would get the possibility to deactivate it.
did you find a good answer to this? I would like the user to either press OK (to apply the changes that they did on my form), or press Cancel or Escape to cancel the editing.
I can promote my form OK button - but it appears on the top left of the page - so there is one OK button that works, and one OK button that does nothing!!!
-awarn
We also had an MPO-support case for this and maybe the answer to this might help you.
Answer to our MPO-support case:
I'm sorry, but there is no standard Page as you would like.
In effect, you can setup the Data and Actions inside the Page in the Page Designer, but you cannot setup the appearance of the window: all Pages have a "OK", or a "Close" button.
Since you cannot eliminate the added buttons by the Role tailored Client application, the best way is to use it for your own needs.
The code in the trigger 'Form - OnQueryCloseForm() : Boolean" is send by the Transformation Tool the trigger "OnQueryClosePage(CloseAction : Action None) : Boolean". It is then interesting to use the close trigger (you do not need add button in the Form since this trigger is used too by the Red close box on top right on any window) instead of your own "Import" button, even if it is not right.
If you really would like a nice Form and Page design, you will have no other choice than to develop it separately.