Options

How to invoke a browser in Axapta?

fred_shenfred_shen Member Posts: 15
edited 2005-03-07 in Dynamics AX
I would like to know in Axatpa, how to invoke the IE or Navigator? Could anyone show me the code? Thanks in advance!

Comments

  • Options
    sahibeksahibek Member Posts: 13
    If your are MorphX programmer, you can watch the code on the place, where the IE is called.
    For example Contacts.

    bye
  • Options
    HarishHarish Member Posts: 172
    Hi,

    See whether this helps. -

    static void IExplore(Args _args)
    {
    #WINAPI
    ;

    WINAPI::shellExecute(C:\\WINDOWS\\ServicePackFiles\\i386\\iexplore.exe');
    }

    Regards,

    Harish Mohanbabu
    Harish Mohanbabu
    Long way to go before I sleep..
  • Options
    fred_shenfred_shen Member Posts: 15
    Thank you!
    But if I want to invoke IE with a certain specified URL?
  • Options
    HarishHarish Member Posts: 172
    Hi,

    You can use WinAPI::ShellExecute() again. Like -

    static void IExplore(Args _args)
    {
    #winAPI
    ;

    winAPI::shellExecute('C:\\WINDOWS\\ServicePackFiles\\i386\\iexplore.exe','http://www.mibuso.com');
    }

    Regards,

    Harish Mohanbabu
    Harish Mohanbabu
    Long way to go before I sleep..
  • Options
    fred_shenfred_shen Member Posts: 15
    Thank you!

    That is what I need!
  • Options
    picklepickle Member Posts: 2
    Hi!

    I always use this format:
    winAPI::shellExecute('http://www.mibuso.com');
    

    My reason behind this is simply because this allows the shell to work out how it's going to deal with the URL, rather than passing it to a program. For example, if the path to iexplore changes, or if the user has a different browser installed. This keeps your code fairly "future proof" and lowers code maintenance.

    Cheers!

    - Simon
Sign In or Register to comment.