Skip to main content
Answer

Cannot override PrintQuote on QuoteMaint

  • October 3, 2024
  • 2 replies
  • 31 views

Forum|alt.badge.img+1
        public delegate IEnumerable PrintQuoteDelegate(PXAdapter adapter);

[PXOverride]
public IEnumerable PrintQuote(PXAdapter adapter, PrintQuoteDelegate baseMethod)
{
IEnumerable returnValue = adapter.Get();

try
{
returnValue = baseMethod(adapter);
}
catch (PXReportRequiredException ex)
{
ex.Mode = PXBaseRedirectException.WindowMode.New;

throw ex;
}

return returnValue;
}

Any ideas?  Customer wants this to re-direct to a tab instead of same window

Best answer by rjean09

Wound up just creating a new action.  Seems to work OK.

        public PXAction<CRQuote> printQuoteTab;

[PXUIField(DisplayName = "Print Quote Tab")]
[PXButton]
public IEnumerable PrintQuoteTab(PXAdapter adapter)
{
IEnumerable returnValue = adapter.Get();

try
{
returnValue = Base.PrintQuote(adapter);
}
catch (PXReportRequiredException ex)
{
ex.Mode = PXBaseRedirectException.WindowMode.New;

throw ex;
}

return returnValue;
}

 

2 replies

Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • Answer
  • October 3, 2024

Wound up just creating a new action.  Seems to work OK.

        public PXAction<CRQuote> printQuoteTab;

[PXUIField(DisplayName = "Print Quote Tab")]
[PXButton]
public IEnumerable PrintQuoteTab(PXAdapter adapter)
{
IEnumerable returnValue = adapter.Get();

try
{
returnValue = Base.PrintQuote(adapter);
}
catch (PXReportRequiredException ex)
{
ex.Mode = PXBaseRedirectException.WindowMode.New;

throw ex;
}

return returnValue;
}

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • October 3, 2024

Thank you for sharing your solution with the community @rjean09!