Skip to main content
Solved

Cannot override PrintQuote on QuoteMaint


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
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • 77 replies
  • 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
  • 2754 replies
  • October 3, 2024

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings