Go To URL System Function

Larry_Jones

Larry_Jones

Legendary Poster
My situation is that I am trying to use this function in a stub application that only exists to call the Go To URL function (to bring up a document in a browser). After executing Go To URL in the Post Dialog Is Initialized event the application then presses the Cancel button and exits. Here's the code:
---------------------------------
VA frm_TestURL = "http://wagnas1.wagstaff.com:12790/DrawingPDFs/0021030B.PDF"
Go to Url(VA frm_TestURL)
Press Button(HC &Cancel)
---------------------------------

The problem is that while this executes fine on the Fat Client (all environments) and also works in the Dev Web Client, for the Production Web Client the Go To URL does NOT fire. Rather the application seems to hang. If I remove the Press Cancel Button line it works fine. Splitting the code to different events (Dialog Initialized, Cancel Button Clicked, etc) has no effect. Dev and Test have the same Service Pack Level and also run on the same servers.

I did find a SAR on MetaLink as follows:
----------------------------------------------------------
SAR 7581961 reports an issue with putting the Go To URL on a button followed by additional logic that pushes the close button. The button is pushed in the Post Dialog is Initialized Event. This causes the same symptoms you are seeing where the application works correctly on the Windows client, but the URL is not opened on the Web client. The SAR is closed with a redesign not planned and the following information from the engineer:

In the web client, when we open a form from menu, we process the event rules first, so we save the URL for later use, after all the ERs are processed, we start rendering our form, since in this case, the form is closed in the Post Button Clicked ER, there is nothing to render, thus the URL is not opened for the end user. The SAR is closed as this functions as designed on the web client.

Review the custom application to see where the event rules have been coded for the Go To URL system function. Avoid events such as the OK button or OK-Post Button Clicked where the form is being closed. Verify that other event rules on the same event are not causing the issue by closing the form. The event rules will be processed first and then the URL will be opened.

Customer had system function on the Post Button Clicked event of the OK button. Moving the event rules to a more appropriate event resolved the issue and the system function then opened the URL as expected.
----------------------------------------------------

Since I don't want any form to be displayed the suggested solution doesn't work for me (nor do I understand why it does work in the development web client). Any suggestions how to get around this? Any BSFN that might accomplish the same thing?

Thanks,
 
Could you use some embedded javascript to open the url and close the form instead of the jde system function?
 
Larry,

Here is an idea - though I'm not sure what sort of idea it is - it may be an exercise in futility. Anyway, here goes: Create an NER to house the "Go TO URL" then call it asynchronously from the Cancel post button clicked event.

I have absolutely no idea if this will work.
 
Larry,
If its just plain form try to replace Cancel button with OK and see if it works,
if not then you can use the text block to create a Javascript to open file and then close the apps.

hope this helps.

Thanks,
Chan
 
Putting the "Go To URL" functional call in a NER would be great . . . unfortunately you can't do that though.
 
Chan,

not sure what the point of replacing Cancel with OK buton is all about . . . Regardless I tried multiple combinations of controls and events and the only thing that works (in Production) is allowing the form to actually display as per the SAR.

Appreciate the Javascript suggestion that you and Boster posted.
Guess I'll have to do some research and learn about that approach.

The really weird thing still is that it Works in Development (yes I compared many .ini settings - but couldn't find anything to explain this).

Thanks again all,
 
Larry,

Of course it can't. What was I thinking? That's just it, I wasn't.
blush.gif
 
Back
Top