Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Make a field required

(1) ShareShare
ReportReport
Posted on by 7

Hello community. Hopefully a simple question. Trying to customize Voucher Entry screen 03.010.00, and make Invoice Number a required field.

Change the BlankErr property to True, but now I have follow-up questions:

- Shouldn't there be a red border around required fields? Is there a way to add red border around Invoice Nbr field?

- After selecting a vendor, and TAB over to the next field, I get SysMsg 2 warning. It does it even if I enter value in the Invoice Number field before I select my vendor. Is there a way to implement Required Field differently, so that I don't get that annoying popup every time? Maybe via a function that checks the value of the "bapdoc.invcnbr" fieldname before it saves?

---------------------------
System Message 2
---------------------------
Data must be entered in this field
---------------------------
OK   
---------------------------

I am not an expert in Solomon VBA or SDK, that's why I'm asking. Something like this perhaps??? It doesn't actually work. So, I need help.

Private Sub cinvcnbr_Chk(ChkStrg As String, retval As Integer)
    Dim liErr As Integer
    Dim lsMsg As String
    lsMsg = "Invoice Number is Required."
    If (Trim(ChkStrg) = "") Then
        Call MessBox(lsMsg, MB_OK, "Invoice Number Check")
        retval = ErrNoMess
    End If
End Sub

Private Sub Update1_OnUpdate(ByVal Level As Integer, ByVal InsertFlg As Integer, retval As Integer)
    Dim liErr As Integer
    Dim lsMsg As String
    lsMsg = "Invoice Number is Required."
    If (Trim(ChkStrg) = "") Then
        Call MessBox(lsMsg, MB_OK, "Invoice Number Check")
        retval = ErrNoMess
    End If
End Sub

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Featured topics

Product updates

Dynamics 365 release plans