Skip to main content
Solved

Cannot override PrintQuote on QuoteMaint

  • Oct 3, 2024 4:25 PM UTC
  • 2 replies
  • 66 views
  • Translate All

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;
}

 

View original

2 replies

Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • Answer
  • Oct 3, 2024 8:37 PM UTC

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;
}

 

Translate

Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • Oct 3, 2024 8:39 PM UTC

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

Translate