Contents tagged with Redirect

  • how to make redirects in Acumatica and popup warning

    Hello everybody,

    today I want to write a newer post about how to give an opportunity to user go to some link from Acumatica. As I've mentioned in https://blog.zaletskyy.com/types-of-redirects-in-acumatica, redirections are implemented as exception. Let consider next simple code, by which you can implement it:

    In your page (in our example this is SO301000) a button will appear:

    If user will click to this button, then he'll immediately receive requested data right in main window:

    This approach has the disadvantage - the user will lose all unsaved data. So let's change our code to warn the user about it:

      Now, after the user clicks on the "Learn More" button, a popup window … more

  • New functions for redirect in Acumatica

    Hello everybody,

    today I want to say few words about new functions for redirect in Acumatica, and particularly about class PXRedirectHelper. 

    Classical approach from T200/T300 manual may look like this:

    var currentCse = Cases.Current;

    if(currentCse == null)

    return;

    var graph = PXGraph.CreateInstance<CRCaseMaint>();

    graph.Case.Current = graph.Case.Search<CRCase.caseCD>(currentCse.CaseCD);

    if (graph.Case.Current != null)

    {

    throw new PXRedirectRequiredException(graph, true, "Case details");

    }

    But with new function all of those lines can be simplified to this:

    PXRedirectHelper.TryRedirect(Cases.Cache, Cases.Current, "Edit case", PXRedirectHelper.WindowMode.NewWindow); … more

  • Types of redirects in Acumatica

    Hello everybody,

    today I want to note about redirects. In Acumatica you can redirect user to another webpage. Acumatica provides option of redirecting to following scenarios:

    To another page in Acumatica

    To another report

    To any destination url

    Try to gues, how redirections are implemented? As exception. If you consider it as wrong approach, I can partially agree with you. But only partially, because redirecting to antoher page is really some kind of exceptional situation. 

    Below goes code of redirecting to page PM302000 at some TaskID and some projectid selected, which will be opened in new window:

    UsrPMTaskReplace taskRepl = JiraAccountTasks.Current;

    ProjectTaskEntry graph = … more