how to get Server Name in NAV 2009 classic

makaramakara Member Posts: 25
edited 2014-06-21 in NAV Three Tier
Could anyone please tell me how to get Server name in NAV 2009 Classic ?

Thx in advance,
makara

Answers

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Have a look at this How To: How To retrieve servername and servertype?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • makaramakara Member Posts: 25
    sorry Luc,

    I tried to use function 'CONTEXTURL'. But I got a error window populate every time I save my table. (please see image)
    the message in description is "Function 'CONTEXTURL' is obsolete for Microsoft Dynamics NAV Server."
    what is the problem with my Navision ? I use Nav 2009 R2.
  • SiStSiSt Member Posts: 46
    The function does not work in the RTC client that is the reason for the warning. I think if you put the code in a block like shown below the warning will disapear. But if you only use the classic client you can also just ignore the message.
    IF NOT SERVICETIER THEN BEGIN
      // Code with CONTEXTURL
    END;
    
  • aavioaavio Member Posts: 143
    can you check in table - 2000000047 Server, --> My Server field
    aav!o
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    makara wrote:
    sorry Luc,

    I tried to use function 'CONTEXTURL'. But I got a error window populate every time I save my table. (please see image)
    the message in description is "Function 'CONTEXTURL' is obsolete for Microsoft Dynamics NAV Server."
    what is the problem with my Navision ? I use Nav 2009 R2.
    This is not an error but a warning. If you don't use RTC, then your code doesn't need to be compiled for the NAV server and you can uncheck the field "Enable for Microsoft Dynamics NAV Server" in the Options-tab of File -> Alter database. Then you get rid of the warning. The code will execute fine when using the classic NAV client however.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • makaramakara Member Posts: 25
    Thx guys, it works now .. :). I use CONTEXTURL and SESSION Table.
Sign In or Register to comment.