Nav 2013R2 Web Client GetURL incorrect

kevindstanleykevindstanley Member Posts: 11
edited 2014-02-26 in NAV Three Tier
Hi I am having issues with the GETURL functionality. I use it to get Nav Url's to a third party application. The windows client url works perfectly, but the web client is wrong and I cannot find the configuration that tells GETURL how to build the url.
http://myServer:48900/DynamicsNAV71_Instance1/Webclient?company=theCompanyName&page=99000831&bookmark=35%3bHRUAAACLAwAAAAJ7%2f1IAUABPADEAMAAwADEAOQAw

the actual URL that it is supposed to be.
http://myServer:48900/DynamicsNAV71/Webclient?company=theCompanyName&page=99000831&bookmark=35%3bHRUAAACLAwAAAAJ7%2f1IAUABPADEAMAAwADEAOQAw

It is tacking on _Instance1 to the InstanceName and I cannot figure out why. If you could point me in the direction of where that is configured that would be great.

*Also I should note that when I open the Windows Client -> Help -> About This Page in the URL fasttab the WebClient URL is incorrect as well. Same as above.

Thanks.

Comments

  • vremeni4vremeni4 Member Posts: 323
    Hi,

    This is a bug which I think was fixed in the Rollup 1 for NAV 2013 R2.
    For more information see
    https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?scid=kb;EN-US;2914930

    You can install the latest Rollup 4 which will also fix other issues, or you can write you own code that will correct the entry from Geturl command.

    I hope this helps.
  • kevindstanleykevindstanley Member Posts: 11
    Hi thanks for the suggestion. I did install the update on the SERVICE, NST, RTC and WEB CLIENT folders from Rollup 4. Unfortunately I cannot run the complete object update as the system I am working on has virtually almost object modified in some way. The updates I did did not fix the issue unfortunately.

    Do you know where the GETURL function code would be located in C/AL because I cannot seem to locate it. When I right-click-> go to definition nothing seems to happen for me.

    Or where is the data that holds the "instance name" data that GETURL is using to remove '_Instance1' possibly.

    Thanks again!
  • vremeni4vremeni4 Member Posts: 323
    Hi,

    It was a few months ago but I think to remember that GETURL (should) read information form the file
    C:\ProgramData\Microsoft\Microsoft Dynamics NAV\71\ClientUserSettings.config
    This is a standard config file for RTC client.
    If it does not read it from there then from the config file for the NAV Service.
    C:\Program Files\Microsoft Dynamics NAV\71\Service\CustomSettings.config
    So it may be worth to check these two files, but in our case it did not work.

    The Command GETURL is part of the Finsql.exe so it is not really possible to change it.
    Luckily, in our case, the problem was on the Codeunit 440 Approvals Mgt Notification and function
    LOCAL GetApprovalEntriesWebUri() : Text
    
    // Generates a url to the Approval Entries list page, such as
    // http://server:port/instance/WebClient/company/runpage?page=658<?Tenant=tenantId>.
    EXIT(GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Page,PAGE::"Approval Entries"));
    
    as approval email got a wrong link from the function GetApprovalEntriesWebUri(). (the same issue as in your case)
    We just change the function
    LOCAL GetApprovalEntriesWebUri() : Text
    
    // Generates a url to the Approval Entries list page, such as
    // http://server:port/instance/WebClient/company/runpage?page=658<?Tenant=tenantId>.
    TempUrl:=GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Page,PAGE::"Approval Entries");
    //code to correct tempurl, 
    EXIT(TempUrl);
    

    I hope this helps.
  • kevindstanleykevindstanley Member Posts: 11
    I had all of the settings configured properly for my ServerInstance tag in both files. My only option appears to be to modify the url after the incorrect one is generated. Hopefully on multi-instance server setups the additional "_Instance1" stays consistent. All I am going to do is write a find and replace for "_Instance1" with "" and everything should be working fine.

    Thanks again for all of your help!
  • Lars_WestmanLars_Westman Member Posts: 116
    I'm on the latest 2017 build and it still gives the wrong port numer for the web client URL....
Sign In or Register to comment.