Skip to main content
Solved

Change Error message


arun83
Jr Varsity II
Forum|alt.badge.img

I have create duplicate screen using Purchase Order screen, everything work well but i am not able to change the error messages. How to change ‘Purchase Order instead of my screen name. 

 

Thanks,

Arun.

Best answer by Naveen Boga

Hi @arun83  If I understand correctly, that you wanted to rename the error message with your new screen  name instead of Purchase Order. If yes, please find the details below.

As you created the DUPLICATE screen with the same DAC/VIEWS for the Purchase Orders screen, hence it is taking the ‘Purchase Order’ for the every message as it is defined CacheName for the POOrder.cs file.

If you can change this, you can get your screen name for every message.

 

 

View original
Did this topic help you find an answer to your question?

3 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @arun83,

I couldn’t exactly location from where the message is coming from. But you could try the following workaround,

 

As the error is thrown in while persisting the document, call the base in try and catch PXException, after which you can throw an exception with message as you need. Sample implementation you can try,

    public class POOrderEntry_Extension : PXGraphExtension<PX.Objects.PO.POOrderEntry>
    {
        #region Event Handlers
        public delegate void PersistDelegate();
        [PXOverride]
        public void Persist(PersistDelegate baseMethod)
        {
            try
            {
                baseMethod();
            }
            catch (PXException e)
            {
                // Acuminator disable once PX1050 HardcodedStringInLocalizationMethod [Justification]
                throw new PXException("Test Message");
            }

        }

        #endregion
    }

 

Good Luck.!


arun83
Jr Varsity II
Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • 23 replies
  • November 6, 2023

Vignesh Ponnusamy

 

I received error while approve document. Approve action clicked through work flow. 

 

How to override workflow actions? 

 

Thanks,

Arun.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3385 replies
  • Answer
  • November 9, 2023

Hi @arun83  If I understand correctly, that you wanted to rename the error message with your new screen  name instead of Purchase Order. If yes, please find the details below.

As you created the DUPLICATE screen with the same DAC/VIEWS for the Purchase Orders screen, hence it is taking the ‘Purchase Order’ for the every message as it is defined CacheName for the POOrder.cs file.

If you can change this, you can get your screen name for every message.

 

 


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