How show a message with Ok and Cancel

LeroyLeroy Member Posts: 199
Hi, I'd like to know how I can do this; I think is easy :oops:

How can I show a message, when a field is going to be modified ,that also shows the Ok and Cancel options?.
Thanks in advance.

Comments

  • garakgarak Member Posts: 3,263
    NAV only support Error(Only a OK Button), Message (Only a OK Button), Confirm (Only a YES and NO Button) and a Dialog with cancel.
    So if you really need OK and Cancel, u must create a separete form or u use the confirm statement (but not in a transaction!, then you block other users)

    Regards
    Do you make it right, it works too!
  • LeroyLeroy Member Posts: 199
    Ok, thanks for reply. Well, exactly, what I'd like to do is that, when you write in a field this ask if you really want change it or not, that was the reason because I asked for a Ok or cancel option. You know is there is any other way to do this?,
    Thanks again.
  • SaalekSaalek Member Posts: 181
    So you need CONFIR instruction

    Field XXX OnValidate
    IF not confirm('xxxxxxxx') then
    error('Modification canceled');

    Bye
  • LeroyLeroy Member Posts: 199
    Perfect. Thanks both for help; i'll try it.
    Thanks again.
  • DenSterDenSter Member Posts: 8,304
    I don't like that at all. If that field is validated as part of some process, your transaction will block everyone while the system is waiting for the user to click one of the buttons.
  • kinekine Member Posts: 12,562
    Me too...It is only way to locked database. As minimum add condition that CurrFieldNo must be same as th field No., to make this confirm only if the field is directly edited by the user.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.