Disabling F3 dynamically

KecKec Member Posts: 3
edited 2005-01-18 in Navision Attain
Hi,
does anybody know if you can dynamically forbid the user to open a new record (by pressing F3) on a card form?

I have a situation in which I don't want the user to be able to leave the current record until he clicks some button. So far, I managed to keep the user on the current record in all situations except when he presses F3.

any help will bi greatly appriciated.

Comments

  • SavatageSavatage Member Posts: 7,142
    there is a mention of disabling F3/F4 in this post.

    I have not tried it myself.

    http://www.mbsonline.org/forum/topic.as ... disable,f3

    maybe it will be helpful.
  • SavatageSavatage Member Posts: 7,142
    just for a test - I opened my Sales Quote form.

    Opened Designer - View - properties - & Changed EDITABLE=NO

    & I can no Longer F3

    Then I Tried

    EDITABLE=YES
    ALLOW INSERT=NO

    & I can no longer F3

    Maybe you can use this as is or in a code.

    IF (YOUR BUTTON) Then Allow Insert=Yes

    type-o-thing
  • KecKec Member Posts: 3
    Savatage wrote:
    Maybe you can use this as is or in a code.

    IF (YOUR BUTTON) Then Allow Insert=Yes

    type-o-thing


    thanks,
    but you can't change the "Allow Insert" property dynamically...
  • wonmowonmo Member Posts: 139
    for form property InsertAllowed select FALSE.

    Create an "insert button", declare a variable of the table that the form is using and attach this code:

    table.INSERT(TRUE);
    GET(table."No.");

    Now, it's easy to state any condition that you want to specify before anyone can insert a record.

    I have implemented explicit edit and insert functionality for all the custom forms that I have created such that edits/inserts are allowed only after pressing their respective buttons. Also, navigation is impossible unless either the insert/edit is saved or cancelled. So, if you have any other questions feel free to ask.
Sign In or Register to comment.