I have a form with a header and a subform. I want to display an error message only once; the first time the user modify any field in the form. What is the best solution to do this?
I HAVE to show the error message only once. The user must be able to modify fields and the first time he modify a field he got the error message "it's better to not modify the field!"). After that the user can choose to continue modification of fields and the message will not be displayed again.
You can do it in another way - have non-editable form, add one buton. This button must be pressed, warning is showed and the form is enabled for editing... :-) there are many ways how to solve one task...
The OnModifyTrigger is not activated when the user modify a field but only after going to another recordor colosing the foirm... and that's not what i need. What i need is that: when the user start modifying the value of any field in the form he got the warning message. The idea of adding a button is good but is there other solution with which we don't have to modify the structure of the form? The solution i found is to add this message in the trigger OnInputChange of all the fields but that takes a lot of time!!!! Is there other solution?
You need to look at this from correct point of view:
Navision is DB applications driven by Events (triggers). If you want to do something and you cannot find correct trigger for that, you need to create your "own" trigger and make the user to use this trigger in correct time.
For this example it is " creating new button which will trigger what you want, and by disabling editing make user to press this button when he want to edit the form". For example, it can be some rectangular button in left bottom corner of the form with some icon... :-)
I can not see another simple solution for that... Because there is no simple event for "beginning of modifications"...
Sorry but that doesn't work like i want. I think there's no solution to detect the first modification in a form rather than adding the code displaying the message in the trigger PnInputChange of all the fields!! That's boring to do but that's the only solution i found and that doesn't modify the apparence of the form :?
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Please how to do this?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Navision is DB applications driven by Events (triggers). If you want to do something and you cannot find correct trigger for that, you need to create your "own" trigger and make the user to use this trigger in correct time.
For this example it is " creating new button which will trigger what you want, and by disabling editing make user to press this button when he want to edit the form". For example, it can be some rectangular button in left bottom corner of the form with some icon... :-)
I can not see another simple solution for that... Because there is no simple event for "beginning of modifications"...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.