Skip to main content
Question

Launching an external url from mobile


Tony Lanzer
Semi-Pro I
Forum|alt.badge.img+1

I have code that opens a new tab to an external URL like this (builder.Uri is just referencing a url):

throw new PXException($"Redirect0:{builder.Uri}$target=_blank")

This fails on mobile. I assume maybe because the mobile browser doesn't recognize it? If so, does anyone know how to launch an external web app from the Acumatica mobile app?

5 replies

hdussa
Jr Varsity I
Forum|alt.badge.img
  • Jr Varsity I
  • 99 replies
  • October 4, 2024

Hello @Tony Lanzer ,

 

Assuming this external URL is from an action, did you try mapping the action and setting the Redirect attribute to True?

add recordAction "ViewOnMap" {
behavior = Void
redirect = True
}

 


Tony Lanzer
Semi-Pro I
Forum|alt.badge.img+1
  • Author
  • Semi-Pro I
  • 75 replies
  • October 4, 2024

@hdussa, It originates from an action, correct. However, it does more than redirect. It needs to build a token with a client secret, and build a URL with parameters. The action method currently calls multiple other methods.  I guess I could try moving the redirect line up the call stack to the actual action method and give that a try with what you suggested. I’ll report back whether that works. Thanks for the suggestion!


hdussa
Jr Varsity I
Forum|alt.badge.img
  • Jr Varsity I
  • 99 replies
  • October 9, 2024

Hello @Tony Lanzer ,

Please let us know if the solution worked. Thanks!


Tony Lanzer
Semi-Pro I
Forum|alt.badge.img+1
  • Author
  • Semi-Pro I
  • 75 replies
  • October 23, 2024

I ended up changing the redirect to this:
 

throw new PXRedirectToUrlException(uri.ToString(), PXBaseRedirectException.WindowMode.New, string.Empty, false);

and also added your suggestion to the mobile MSDL. It no longer errors on mobile but it appears to open a new Acumatica instance “window” instead of the external URL.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2759 replies
  • January 14, 2025

Hi ​@Tony Lanzer were you able to find a solution? Thank you!


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