I need to show an error message when unit price is 0 in sales order line details.
User can upload the sales order line details from excel into sales order screen and according to the inventory item unit price is automatically capture from arsales form.
I add fieldverifing event below like that.
protected void SOLine_CuryUnitPrice_FieldVerifying(PXCache cache, PXFieldVerifyingEventArgs e, PXFieldVerifying baseMethod)
{
SOLine row = e.Row as SOLine;
if (row.CuryUnitPrice == 0)
{
throw new PXSetPropertyException("Unit Price should not be 0");
}
}
After uploading so line from excel ,If condition is true or false error message is shown.
Best answer by jeewanishalika20
View original