Navigation Pane control

Dear All

I have created a form in which i am asking user to select responsibility center at runtime at the time of login after selecting company.

i have called this form from codeunit 1 by using the code as below




& also i have written a code on form Query close
Form - OnQueryCloseForm() : Boolean
EXIT(flag); //here i m passing flag=true only from ok Button of the form.

Problem is that when i am opening database & selecting company then form 50197 is asking user for input when user is filling input & pressing ok then it’s fine but when press F12 or main menu then it will open the Navigation Pane designer.

what i want is that untill user input some data it will not allow him to open Navigation Pane.

Please help me out.



You need to create a new function (name doesn’t matter), but you need to give it ID=1 in its properties. In this way it will also be opened by F12.

PS you should use ‘FORM.RUNMODAL(FORM::“Form Name”)’. This is better programming style and usefull for later searching where the form is used.

Dear Kriki

thanks for your reply

i have written a code in Function Company Open in Codeunit 1

usersetup.GET(USERID); ///where usersetup is a variable of record type with table id 91 user setup

now the problem is that when i want to check that whether the USERID exist in usersetup table or not, & let say it did not exist then it should not allow user to open Navigation Pane.

(Create a database login let say AAA with super role ) now try to login in to db after writing a code as above in codeunit 1.

now it should not allow this user to enter into Navision Navigation pane as we have not created this userid in table 91.

please check.



I didn’t read your original post well. I missed the phrase about opening the Navigation Pane. [:$]

I am afraid you cannot avoid that the user opens the Navigation Pane.