Solved

Change Error message

  • 28 October 2023
  • 3 replies
  • 81 views

Userlevel 2
Badge

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.

icon

Best answer by Naveen Boga 9 November 2023, 08:13

View original

3 replies

Userlevel 7
Badge +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.!

Userlevel 2
Badge

Vignesh Ponnusamy

 

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

 

How to override workflow actions? 

 

Thanks,

Arun.

Userlevel 7
Badge +19

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved