Skip to main content
Question

PXRedirectToUrlException NOT working in Mobile App

  • December 13, 2024
  • 5 replies
  • 44 views

Forum|alt.badge.img

I have a mobile App that has a custom action which will redirect to an external Web Page.

It was working a week ago. The customer was playing with creating their own customization, and mucked things up and asked our admin to restore a snapshot. When they did this, the customization that calls the external web site stopped working.

I cannot figure out why.

The call to the Redirect is:

                // Everything is gathered up. Time to send it
                var redirectException =
                  new PXRedirectToUrlException(fullURL,
                      PXBaseRedirectException.WindowMode.NewWindow, 
                         "This is a Message, which gets ignored in this case", false);
                throw redirectException;  // call URL

This works when run from the browser. However, not from the mobile device.

In the Customization, this action is defined like this:

update screen FS300200
  {
  update container "AppointmentRecords"
    {
    add recordAction "ASGExtForms"
    {
      behavior = void
      redirect = True
    }
    }
 }

(Again… this used to work)

But now, when I login to the Mobile App, I am taken to this screen:

Main Screen

I select the three dots to get the action menu

Action Menu

Then I choose the DoorForms action which calls out the URL using the above code:

 

But instead of going to the DoorForms website, I am taken to the dashboard of the mobile app:

When I look at Trace, I see no errors. I only see some SELECTs executing to gather the appointment information, and a few refreshes of the screen listed. There are no errors or exceptions.

I can put a breakpoint on the exact PXRedirectToUrlException line in my source code, and when the Mobile app hits it, I get the break, and can confirm that teh url is exactly the same as it is when I run it from the web browser, but it works in the web browser, and not the Mobile app.

Everything seems to be running fine, but is (no longer) will open the web page like it used to.

I have tried every variation of PXBaseRedirectException.WindowMode, but always get the same result. (Although I am not sure if I need to refresh the mobile cache every time or not.)

I’m not sure how to even start debugging this right now.

Any suggestions are surely appreciated.

 

5 replies

stevejames
Freshman I
  • Freshman I
  • 10 replies
  • December 16, 2024

I have a similar issue I am getting this 


 

 


Forum|alt.badge.img
  • Author
  • Varsity I
  • 76 replies
  • December 16, 2024

@stevejames - Does yours work when called from the Browser? (ie the Acumatica IIS application?)


stevejames
Freshman I
  • Freshman I
  • 10 replies
  • December 16, 2024

@mjgrice32  yes it does. 


stevejames
Freshman I
  • Freshman I
  • 10 replies
  • December 16, 2024

@mjgrice32 oddly enough it works from the SalesDemo without issue under the appointments screen. 

 


Forum|alt.badge.img
  • Author
  • Varsity I
  • 76 replies
  • December 23, 2024
stevejames wrote:

@mjgrice32 oddly enough it works from the SalesDemo without issue under the appointments screen. 

 

Until it doesn’t… 

My experience seems to indicate that this is an intermittent problem that surfaces. I have had it go away and come back when things are published and unpublished over time.

My current theory is that the issue stems from the fact that Acumatica’s mobile app is essentially a browser they created internally that understands how to implement their UI. So, when you throw a PXBaseRedirectException, it is creating the page in its internal browser. My guess is that there are sometimes things that happen which throw Acumatica’s home-built browser for a loop, whereas a more robust and stable browser (like Chrome or Firefox) handles it just fine. This would be why it works in the “back office” (where chrome is being run) and fails on the mobile app. 

There are other things that won’t work on the mobile app’s browser, like certain javascript functionality.

I’m trying to find a workaround to this. Ideally, I would like to have some sort of PXBaseRedirectException that let me specify a different browser. But I don’t think that is even on the drawing board at Acumatica.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings