System functions not supported in RTC

havhav Member Posts: 299
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?

Thanks,
Hemant
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,503
    For ENVIRON function you can use EnvironFileName function of codeunit 419-3-Tier Automation Mgt.
  • 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

    Michael
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • iceborgiceborg Member Posts: 67
    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 Member Posts: 202
    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.

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

    Thank you.

    Regards
    Rachel
Sign In or Register to comment.