launch a url out of a page action

FrankjanssenFrankjanssen Member Posts: 9
edited 2013-10-31 in NAV Three Tier
Hello,
i want to launch a external BI application out of a nav rtc page.
The link that has to be run looks like this:
mw://servername/ManageWareClient/ManageWareClient.exe?srv=servername&firma=firmenname&query=Masterauswertungen%5cVerkauf%5c2-Kunde-Artikel-LJ-Sort-Artikelnummer&queryparams=;dim=[Kunde].[Kunde];members={21299}

As the single line whithin the code is a maximum of 132 chars long i splittet it in three text variables:
MW1Text:= 'mw://servername/ManageWareClient/ManageWareClient.exe?srv=servername'  ;
MW2Text:= '&firma=firmenname&query=Masterauswertungen%5cVerkauf%5c2-Kunde-Artikel-LJ-Sort-Artikelnummer'
MW3Text:= '&queryparams=;dim=[Kunde].[Kunde];members={21299}' ;
This is launch with the HYPERLINK function like this:
HYPERLINK(MW1Text + MW2Text + MW3Text);
Now i get an error message: "Die Linkadresse ist ungültig" (The Linkadress is not correct ??)
If i copy the string into a iexplorer´s link field, everything works fine.
The "mw://" translation thing is done by a locally installed "Managware URL Handler"

thanks for any suggestions and help.

Frank
Frank

Comments

  • BeliasBelias Member Posts: 2,998
    businnes logic is executed from the nav server. Try to access the URL from the internet explorer where your nav server is placed. Maybe, it is somewhat blocked.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • FrankjanssenFrankjanssen Member Posts: 9
    Hello belias,
    thks for answering.

    I tried the complete link at the service tier server out of internet explorer. Here it works fine.
    The page action out of the rtc still doesnt work. I also started the rtc on the service tier directly
    with same result.

    I also tried to realise this with an automation variable (wshshell), but this didn´t work either. In this case there is no
    error massage but nothing happens.
    Like this:
    CREATE(WSHShell) ;
    _commandLine := 'rundll32 url.dll,FileProtocolHandler + MW1Text + MW2Text +MW3Text';
    _runModally := FALSE;
    dummyInt := 1;
    WSHShell.Run(_commandLine,dummyInt,_runModally);
    CLEAR(WSHShell);
    


    thanks in advance for any further suggestions.

    F.
  • SogSog Member Posts: 1,023
    are some of the characters escaped perhaps? print out the url just before opening it, maybe some slashes are misplaced
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • FrankjanssenFrankjanssen Member Posts: 9
    Hi,
    if i use the "MESSAGE()" function, the string looks correct (see attachment)
  • FrankjanssenFrankjanssen Member Posts: 9
    Hi,
    isn´t there anyone who can help ?
  • buchhotbuchhot Member Posts: 116
    Hello Frankjanssen!

    I know this topic is quite old, but I am having the same issue and don't know how to get rid of it!
    Did you find any solution yet or have found any workaround?

    My situation:
    I have links to Word Documents in a sharepoint-ibrary, they can be opened from the classic client, but sometimes cannot be opened from the RTC.
    The strange thing is that some of the docs work, others don't.
    It has nothing to do with extension-differences (.doc, .docx), already checked that.

    Any ideas?

    Many thanks in advance?

    Is HYPERLINK handing over the link to the local or the remote (on the NAV server) Internet Explorer?

    Kind regards and best wishes
    Thomas
    Thomas Buchholz
    ekey biometric systems GmbH
    4031 Linz
    Austria
    web: http://www.ekey.net
  • FrankjanssenFrankjanssen Member Posts: 9
    Hi Thomas,
    here is my soultion by now:
    1. Define variables
    Name	          DataType	      Subtype	                                                Length
    WSHShell	          Automation        'Windows Script Host Object Model'.WshShell	
    MW1Text          Text                                                                     1024
    MW2Text	         Text		                                                              1024
    MW3Text	         Text		                                                              1024
    dummyInt        Integer
    _commandLine Text                                                                          1024
    _runModally      Boolean
    

    C/AL Code
    MW1Text:= 'mw://wewomnwarew2k3/ManageWareClient/ManageWareClient.exe?srv=WEWOMNWAREW2K3'  ;
    MW2Text:= '&firma=WEWO&query=Masterauswertungen%5CVerkauf%5C4-Kunden-Kennzahlen-3Jahre' ;
    MW3Text:= '&queryparams=;dim=[Kunde].[Kunde];members={' + GetNo +'}' ;
    CREATE(WSHShell,TRUE,TRUE) ;
    _commandLine := 'rundll32.exe url.dll,FileProtocolHandler ' + MW1Text + MW2Text + MW3Text ;
    _runModally := TRUE;
    dummyInt := 1;
    //MESSAGE(_commandLine);
    WSHShell.Run(_commandLine,dummyInt,_runModally);
    CLEAR(WSHShell);
    

    Due to the lenght of the complete link i had to devide the resultung string into 3 parts

    That works fine for me, hope you find it usefull, too.

    F.
  • buchhotbuchhot Member Posts: 116
    Hello Frankjanssen!

    Thank you very much for this super-fast response and the code.
    I will give this a try next week and tell you wether it worked for me.

    Thank you very much and have a nice weekend in advance.

    Best wishes
    Thomas
    Thomas Buchholz
    ekey biometric systems GmbH
    4031 Linz
    Austria
    web: http://www.ekey.net
Sign In or Register to comment.