web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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

I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans