I’m planning to make the SOOrder.ShipVia field required and want to add an error message to help our employees.
I have found a couple of examples but am working with this right now:
namespace PX.Objects.SO
{
public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>
{
#region Event Handlers
protected void SOOrder_ShipVia_FieldVerifying(PXCache cache, PXFieldVerifyingEventArgs e)
{
var row = (SOOrder)e.Row;
if(row == null)
{
string errorMsg = "Ship Via Cannot be Empty";
throw new PXSetPropertyException(errorMsg, PXErrorLevel.Warning);
}
}
#endregion
Not being a programmer, I’m sure there is something simple missing, but I would appriciate the help.