How to make it compulsory / Required when user create customer account, I want to make it cannot save if the line is empty.

and Also how to make the column compulsory / Required in SO line

How to make it compulsory / Required when user create customer account, I want to make it cannot save if the line is empty.
and Also how to make the column compulsory / Required in SO line
Best answer by Naveen Boga
Hi
Please find the code below.
// Sales Orders screen Customization
public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{
#region SalesPersonID
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXRemoveBaseAttribute(typeof(PXDefaultAttribute))]
[PXDefault(typeof(SOOrder.salesPersonID), PersistingCheck = PXPersistingCheck.NullOrBlank)]
protected virtual void SOLine_SalesPersonID_CacheAttached(PXCache cache)
{
}
#endregion
}
// Customers screen Customization
public class CustomerMaintExt : PXGraphExtension<CustomerMaint>
{
public delegate void PersistDelegate();
[PXOverride]
public void Persist(PersistDelegate del)
{
if (Base.SalesPersons.Select().FirstTableItems.ToList().Count == 0)
{
throw new PXException("Salesperson info not found");
}
del();
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.