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 GP (Archived)

Making a field required on a scrolling window

(0) ShareShare
ReportReport
Posted on by

Hello

Is it possible to make a field required on a scrolling window, for example the Reason Code on Item Transaction Entry.

If I change Required to true in modifier under 'Scrolling Window:IV_Transaction_Scroll' it does nothing.

I can't add the columns on the grid to a VBA project either, logically I would want to do -

If column 1 (item no) <> '' then column 2 is required

But I don't know how to achieve this.

Thanks

Tania

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    Yes, did you mark the modified window after making field required?

  • Community Member Profile Picture
    on at

    I'm newer myself to Dynamics GP, so take what I say with a grain of salt. You can do this a couple different ways but make sure you have all the fields added to vba. Then you can either warn the user after they leave the reason code grid or you can prompt them on the save.

    If doing this as they leave the reason box make sure you are editing the ItemTransactionDetail(Grid) not the ItemTransactionDetail(Window). Then something like this:

    Private Sub ReasonCode_BeforeLostFocus(focus, cancel)

       If ItemNumber = "" Then

           If ReasonCode = "" Then

               Msg = "Reason code required"

               Cancel = True

               Focus = True

          End If

       End If

    End Sub

    If doing this on the save, make sure to do this in the proper save Sub and cancel the save and exit the save Sub. Also make sure to do as Almas said and set GP to use the modified window.

  • Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    You just need to open window in modifier, make property required =true for field reason code, go back to gp.mark modified form and thats it.

  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Hi Tania,

    Open your window in Modifier. I think you may be talking about the Inventory Transaction entry window You need to open the scrolling window itself.  Double-click on the scrolling window. The window that opens will show you all of the fields in the scrolling window. Click on the Reason Code field and then change the value of the Required property to True. While this will indeed make the field required, it will not provide the visual queue in the header. If you want it to look like a required field, you'll need to hard-code the color of the header label.

    Kind regards,

    Leslie

  • Community Member Profile Picture
    on at

    No this does not work, when you enter the details on the first line and try to tab to a second line it tells you not all required fields have been entered, but it does not prevent you from hitting save and posting the batch without that field entered.

  • Community Member Profile Picture
    on at

    Hi Leslie, please see my response to Almas, this does not work. I had already had the scrolling window and the right field modified to true. It does not prevent saving and posting.

  • Community Member Profile Picture
    on at

    Actually no apologies, you are correct. I'm not sure what was happening in my testing it seemed a bit buggy, I had opened a previously entered transaction and it was letting me save it. But deleting it and creating a new transaction, the new validation does seem to work. Seems I had it right all along. Thanks!

  • Community Member Profile Picture
    on at

    Sorry again, I tried this on another scrolling window. I was sure I had a problem with this one years ago at another company. The 'Analysis Posting Detail' window on Financia module, making the Posting Description field required.

    I have gone to modifier, 'Scrolling Window:SW Codes' 'DTA_Posting_Desc' field Required = True.

    I have set the Analysis Posting Detail window to the modified version.

    This seems to do absolutely nothing.

  • Verified answer
    L Vail Profile Picture
    65,271 on at

    Hi,

    I think I'm reading that your Transaction scroll window is fine, but you are having a problem with the Analysis Detail Entry window. The problem with that field is that there isn't another field that, out of the box, is required. If no fields are required, the Dex scipt to check and make sure the required fields have been filled, was probably never run. If that is the case, you will not be able to make this field required using Modifier. There are other tools you can use, just not Modifier.

    Kind regards,

    Leslie

  • Community Member Profile Picture
    on at

    Hi Leslie, yes you have understood me correctly. Your knowledge is always very helpful. Having it explained this way makes some logical sense now, but is not something I would have considered myself, was a bit stumped as to why they were giving different results.

    I have quickly written

    Private Sub DTAPostingDescr_BeforeLostFocus(KeepFocus As Boolean, CancelLogic As Boolean)

    If Me.DTACodeID <> "" And Me.DTAPostingDescr = "" Then

    MsgBox "Description Required"

    KeepFocus = True

    End If

    End Sub

    It seems to be working, but I'll need to test it properly when I've got the time.

    Thanks

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans