Background color in Navision?

tentacletentacle Member Posts: 27
Hi,

is it possible to change the background color of Navision from grey to any other color? (Edit: we are running 4.03)

We have 2 Navision Databases (one live and one dev) just before the go-live. The only difference between those databases is the small ending -DEV in one of them. I want to avoid that any user thinks he uses the DEV database and plays around with the 'real' data. So some red color might help!?

Thanks

Comments

  • Timo_LässerTimo_Lässer Member Posts: 481
    We use a very small Form which we will run from Codeunit 1.
    This Form appears always in the upper left corner and shows the Database-Name.
    In OnFormat, we change the color of the textbox, so everybody can see, if he/she is on the "Live db", "Test DB" or in "Dev DB".

    As you come from germany, you can have a look at this discussion: http://www.msdynamics.de/ftopic1367.html
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • WaldoWaldo Member Posts: 3,412
    I posted a solutions some time ago in this thread:
    http://www.mibuso.com/forum/viewtopic.php?t=14824

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • tentacletentacle Member Posts: 27
    This is a very good idea Waldo.

    So I need to get the database name in Navision. Somebody wrote in the download section should be some code for it but unfortunately I can not find it?

    Company name seems to be easy but what about database name?
  • geri79geri79 Member Posts: 105
    I use this in CodeUnit and call it an form similar as discribed above:




    dbname() sret : Text[1000]
    name:=CONTEXTURL;
    i:=STRPOS(name,'database=');
    IF i > 0 THEN BEGIN
    name:=COPYSTR(name,i+9,999);
    i:=STRPOS(name,'&');
    dbname:=COPYSTR(name,1,i-1);
    END;

    sret:=dbname;

    PS: I found it once in the forum...
    geri
  • ArhontisArhontis Member Posts: 667
    Example of getting the db name, the server you are connected to, the userid and the computer name you are connecting with..
    Name	DataType	Subtype	Length
    vSession	Record	Session	
    vServer	Record	Server	
    ServerName	Text		150
    DatabaseName	Text		150
    OtherInfo	Text		150
    
    DatabaseName := '';
    OtherInfo :=  '';
    ServerName := '';
    vSession.SETRANGE("My Session", vSession."My Session"::"1");
    IF vSession.FIND('-') THEN BEGIN
      DatabaseName :=vSession."Database Name";
      OtherInfo := vSession."User ID"  +'-PC:'+vSession."Host Name";
    END;
    vServer.SETRANGE("My Server", vServer."My Server"::"1");
    IF vServer.FIND('-') THEN
      ServerName := vServer."Server Name";
  • tentacletentacle Member Posts: 27
    thanks, works very fine!
  • PhennoPhenno Member Posts: 630
    tentacle wrote:
    thanks, works very fine!

    You have to be carefull with this solution. If you're on Native DB, record "server" (virtual table actually) doesn't exists at all so you'll not be able to, even, compile the form.

    Server table works only on SQL server versions...
  • ArhontisArhontis Member Posts: 667
    You are absolutely right Phenno...
    Thanks for reporting it... Forgot to mention it... :oops:
Sign In or Register to comment.