I have added a custome dialog to AP Bills. What I would like to happen is to force user to enter an “Assignee”. I have set the DAC to validate null values. in my dialog screen it shows * by the field but when user clicks on OK button, even if this field is not entered the dialog continues while it should raise an error that this fieled is not entered. below is my partial DAC:
#region Owner
public abstract class owner : PX.Data.BQL.BqlInt.Field<owner> { }
protected Int32? _Owner;
[Owner(Required = true, ValidateValue = true)]
[PXDefault(PersistingCheck = PXPersistingCheck.Null)]
[PXUIField(DisplayName = "Assignee", Visibility = PXUIVisibility.SelectorVisible)]
[PXRestrictor(typeof(Where<Contact.contactID, NotEqual<Switch<Case<Where<Current<EPRoutingPanelDialog.status>, NotEqual<EPStatuses.routed>>, Current<AccessInfo.contactID>>, Zero>>>), EPMessages.AssigneeCannotBeSameAsTheCurrentUser)]
public virtual Int32? Owner
{
get
{
return this._Owner;
}
set
{
this._Owner = value;
}
}
#endregion
here is my partial aspx:
<px:PXSelector runat="server" ID="edOwner" DataField="Owner" Width="300" Required="True"></px:PXSelector>
and here is the dialog snip:
what I’m doing wrong that dalog allows to proceed with OK without forcing user to enter the Assignee?
Best answer by deebhane
View original