How to use PXRedirectToUrlException in Acumatica with two URLs

Viewed 38

The sample code below will only create a new tab for the first URL. The goal is to have Acumatica create two separate tabs for two different URLs.

int countFirst = 3;
int countSecond = 4;

if(countFirst > 0) {
throw new PXRedirectToUrlException(firstUrl, PXBaseRedirectException.WindowMode.New, "First");
}
if(countSecond > 0) {
throw new PXRedirectToUrlException(secondUrl, PXBaseRedirectException.WindowMode.New, "Second");
}
1 Answers

Being that these are exceptions, the second line of code will not be executed. Perhaps you can try catching the first and if that does not work then maybe try pushing both through a PXLongOperation to get each into its own thread.

Related