System functions not supported in RTC

havhav Posts: 299Member
edited 2009-11-13 in NAV Three Tier
Hi All,
I have few of my exisitng developments which makes use of System functions such as SHELL, ENVIRON, CONTEXTURL etc. Earlier these developments were made on NAV 5.0 W1 sp1 and now they have been migrated to NAV 2009 NA SP1.
When i compile few of my codeunits that uses these functions, the compiler generates warning stating that these functions are obsolete in NAV 2009 Application Server.
I went throught NAV 2009 help file and found that these functions are not supported and hence made obsolete in NAV 2009 RTC.
I am not sure which alternative functions should i use to replace these obsolete functions.
Any idea?

MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)


  • mohana_cse06mohana_cse06 Posts: 5,468Member
    For ENVIRON function you can use EnvironFileName function of codeunit 419-3-Tier Automation Mgt.
  • Michael_Nielsen_[MSFT]Michael_Nielsen_[MSFT] CopenhagenPosts: 47Member
    The reason why these are not implemented in the 2009 Application server is that the logic now runs on the server and not the client. It would create unwanted behavior if these are run on the server (ex: BEEP(); :))

    I you need to mimic the behaviour on the 2009 Application server you need to write a COM object and set it up in C/SIDE so it is called on the client

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • iceborgiceborg Posts: 67Member
    You could also consider using the Windows standard Automation in NAV, declare a Automation variable against "Windows Script Host Object Model" Automation Server.
    It contains most of the stuff you need for Client Machine Access, like FILE,SHELL etc.
    - SHELL a Like Methods in 'Windows Script Host Object Model'.WshShell"
    - Client side FILE Methods in 'Windows Script Host Object Model'.FileSystemObject"

    As it is Client side the user as "usual" needs to accept it first time executed.
  • RachelSoonRachelSoon Posts: 202Member
    Dear All,
    If we are using the NAV 2009 classic instead of RTC, would the function work?

    I am trying to do some customisation at CU440, and i have problem saving the object due to "CONTEXTURL" and "EXPORT".

    Any similar function that can be used to replace this "CONTEXTURL" and "EXPORT"?

    Thank you.

  • RachelSoonRachelSoon Posts: 202Member
    Dear All,
    What about the "EXPORT" in CU440?

    Thank you.

Sign In or Register to comment.