Not able to make the system force entring required fields by the user

  • 2 January 2022
  • 2 replies

Userlevel 7
Badge +9

I have added a custom field to AP Bills that entering value should be mandatory. On the AP Bill screen system shows a red astrix by the field label that when value entered turns its color to black. But system doesn’t force the user to enter value for it and accepts saving the form without having data in this field. I have made it “Required” as you can see below. Why?

Here is the field definiatin:

        #region UsrCFApprovalRouteID
public abstract class usrCFApprovalRouteID : PX.Data.BQL.BqlInt.Field<usrCFApprovalRouteID> { }
protected Int32? _UsrCFApprovalRouteID;
Where<UserPreferences.userID, Equal<Current<AccessInfo.userID>>>>),
PersistingCheck = PXPersistingCheck.Nothing)]
Where<UDCTEPApprovalRoute.isActive, NotEqual<False>>,
SubstituteKey = typeof(UDCTEPApprovalRoute.approvalRouteCD),
DescriptionField = typeof(UDCTEPApprovalRoute.routeName),
ValidateValue = false)]
[PXUIField(DisplayName = "Approval Route", Required = true, Enabled = true, Visibility = PXUIVisibility.SelectorVisible)]
public virtual Int32? UsrCFApprovalRouteID
return this._UsrCFApprovalRouteID;
this._UsrCFApprovalRouteID = value;



Best answer by ChandraM 2 January 2022, 18:49

View original

2 replies

Userlevel 7
Badge +9

Hi @aaghaei Please find the below link for making a field as Required.


Userlevel 7
Badge +9

Thanks @ChandrasekharM 

so based on the post considering my field type is int, all I have to do is to change PersistingCheck = PXPersistingCheck.Nothing to PersistingCheck = PXPersistingCheck.Null

will try to see how it works out.


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved