When a user does not enter a serial number on the Support Entry screen of the portal, I want to popup a dialog box. I can set an error on the field, but the user won’t see the message unless they mouse over the red x. I want them to get a popup with instructions to make it clearer to the user.
The popup works. But it keeps getting called in a loop if I put e.Cancel = true in the event.
If I use Sender.RaiseExeptionHandling, the screen functions properly and if you mouse over the error on the field, it shows my information properly.
If I remove the e.Cancel = true;, the popup occurs once, but the record is still saved...that’s not good.
(DAC shown below...I think that is the issue)

protected virtual void CRCase_RowPersisting(PXCache sender, PXRowPersistingEventArgs e)
{
if (e.Row == null)
{
return;
}
CRCase caseRow = (CRCase)e.Row;
CRCaseSSGPortalExt cRCaseExt = PXCache<CRCase>.GetExtension<CRCaseSSGPortalExt>(caseRow);
if (cRCaseExt.UsrSerialNbr == null)
{
//sender.RaiseExceptionHandling<CRCaseSSGPortalExt.usrSerialNbr>(caseRow, null, new PXSetPropertyException(ISOMessages.PopupSerialNumber, PXErrorLevel.Error));
WebDialogResult result = dummyBaccount.Ask(ActionsMessages.Warning, PXMessages.LocalizeFormatNoPrefix(ISOMessages.PopupSerialNumber),
MessageButtons.OK, MessageIcon.Error, true);
//checking answer
if (result != WebDialogResult.OK) return;
//e.Cancel = true;
}
}
The DAC for the field is as follows:
#region UsrSerialNbr
[PXDBString(100, IsUnicode = true)]
[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
[PXUIField(DisplayName = "Serial Number", Required = true)]
public virtual string UsrSerialNbr { get; set; }
public abstract class usrSerialNbr : IBqlField
{
}
#endregion
If I remove (PersistingCheck = PXPersistingCheck.Nothing) from the DAC, and remove e.Cancel = true, everything works the way it should.
However, I get an acuminator warning

Should I just ignore the warning?
I don’t think I can ignore the warning. If I try to re-open a closed case, there is an error on that field if it was previously closed without a serial number. AND, you cannot edit the field because the case is closed.
