Hi all,
I’m faced to a situation I have trouble implementing. If someone has an idea, it would be nice...
I have a graph (EAPInvoiceEntry) in which I have defined an action that has two purposes :
- first, display a warning using a dialog box,
- Then redirect to an other screen (graph EAPInvoiceProcess).
In the code below I have used, the instructions after warning message calling are not invoked.
// EAPInvoice is a custom DAC, quite a clone of APInvoice
public SelectFrom<EAPInvoice>
.LeftJoin<Vendor>.On<Vendor.bAccountID.IsEqual<EAPRegister.vendorID>>
.OrderBy<Asc<EAPInvoice.refNbr>>
.View DocumentView;
[ExcludeFromCodeCoverage]
[PXProcessButton(Category ="Processing", DisplayOnMainToolbar =true)]
[PXUIField(DisplayName = "Accept")]
protected virtual IEnumerable acceptAction(PXAdapter adapter)
{
DocumentView.Ask("My title", "My Message", MessageButtons.OK, MessageIcon.Warning, true);
// Instructions below are not called
EAPInvoiceProcess eapInvoiceProcessGraph = CreateEAPInvoiceProcessGraph();
throw new PXRedirectRequiredException(eapInvoiceProcessGraph.BaseGraph, false, "Redirection to AP50CG11");
return adapter.Get();
}
private static EAPInvoiceProcess CreateEAPInvoiceProcessGraph()
{
EAPInvoiceProcessBase baseGraph = PXGraph.CreateInstance<EAPInvoiceProcessBase>();
return baseGraph.GetExtension<EAPInvoiceProcess>();
}
Best answer by Mike Gifford
View original