Skip to main content

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.

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 hJustification]
throw new PXException("Test Message");
}

}

#endregion
}

 

Good Luck.!


Vignesh Ponnusamy

 

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

 

How to override workflow actions? 

 

Thanks,

Arun.


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