Hello everyone, Can someone show me how to block the Unit price field in Sales Ordes Screen?
Thanks in advance!
How to block the Unit price field
Hi
Do you want to make the Unit Price field to Read-Only/Non Editable field?
public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{
protected virtual void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
SOLine row = e.Row as SOLine;
if (row != null)
{
PXUIFieldAttribute.SetEnabled<SOLine.curyUnitPrice>(cache, row, false);
}
}
}
Thank you very much Naveen for your prompt response. I'm going to try and let you know how it looks.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/a3c94091-141b-4b3f-92e9-a3fb90af4828.png)
Thanks Naveen the customization you sent me worked out
public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{
protected virtual void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
SOLine row = e.Row as SOLine;
if (row != null)
{
PXUIFieldAttribute.SetEnabled<SOLine.curyUnitPrice>(cache, row, false);
}
}
}
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.