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(graphtrue"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);

With that approach you'll get the same result, but just in one line of code.

Comments (10) -

  • I will right away snatch your rss as I can't in finding your email subscription link or newsletter service.
    Do you have any? Kindly let me recognize in order that I may subscribe.
    Thanks.
  • Do you mind if I quote a couple of your posts as long as I provide credit and sources back to
    your website? My blog site is in the very same area of interest as yours and my visitors would definitely
    benefit from some of the information you present here.
    Please let me know if this ok with you. Regards!
  • Hey I knoᴡ this is ⲟff topic but I ᴡаs wondering if ʏߋu кnew of any widgets Ι cοuld add too mу blog tһat automatically tweet mу neѡest twitter updates.
    І'ѵe beеn l᧐oking for a plug-in lіke this for quite
    ѕome time and waѕ hoping maʏbe you would hаvе some experience ѡith sokething ⅼike thіѕ.
    Pleаse let me кnow іf yߋu гun into anything. I trulу enjoy reading your blog and I
    look forward to yоur neww updates.
  • Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your
    point. You obviously know what youre talking about, why waste your intelligence on just posting
    videos to your site when you could be giving us something enlightening to read?
  • Admiring the hard work you put into your site
    and detailed information you provide. It's great to
    come across a blog every once in a while that isn't the same old rehashed
    information. Excellent read! I've bookmarked your site and I'm adding your RSS feeds to my Google
    account.
  • Heya are using Wordpress for your blog platform?
    I'm new to the blog world but I'm trying to get started
    and set up my own. Do you require any coding knowledge to
    make your own blog? Any help would be greatly appreciated!
  • It's perfect time to make some plans for the
    longer term and it's time to be happy. I have learn this put up and if I may I want to suggest you some interesting issues or advice.

    Perhaps you could write subsequent articles regarding this article.
    I want to learn even more issues approximately it!
  • You made some good points there. I looked on the net to find out more
    about the issue and found most individuals will go along
    with your views on this website.

Add comment

Loading