Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

SysQueryForm input validation

Posted on by 30

Hi,

The form below is a SysQueryForm. I would like to add some validation on the Ship date Criteria. Is there a way to trigger a validation method when clicking the OK button on this form? The idea is to validate the content of the Criteria field, and if the content is invalid, I would like to display a messagebox showing an error message, and then abort the closure of the SysQueryForm.

SysQueryForm.PNG

Any hint, or pointer to documentation or other posts that might be helpful, is appreciated.

Best regards,

Frederiek

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: SysQueryForm input validation

    HI Frederiek,

    On closin gthe dialog, you can add some validation based on the query details. However, like mentioned above, a user can add multiple lines in the query editor for the Ship date. Which value are you then validating?

    That is the reason, why I suggested to have one single additional parameter on the left side.

  • Frederiek Profile Picture
    Frederiek 30 on at
    RE: SysQueryForm input validation

    Hi André,

    You speak of adding a new field in the Setup section. I was just wondering, there is already a field for the ship date on the right-hand side in the Order lines section. This Ship date field is set when specifying the Ship date on the SysQueryForm. Instead of adding a new field on the left-hand side, could I validate the content of the Ship date field on the dialog, indicated by the screenshot?

    ShipDate.PNG

    Best regards,

    Frederiek

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: SysQueryForm input validation

    Hi Frederiek,

    It would be possible to add the validation on the dialog, but would be error prone as persons can change the query, remove a certain field or add two lines with ranges for the same field.

    Probably, you can better customize the dialog and add a new field below the other fields in the 'Setup'. Then you can better control the validation part.

  • Frederiek Profile Picture
    Frederiek 30 on at
    RE: SysQueryForm input validation

    Hi André,

    The SysQueryForm is opened as follows.

    path1.PNG

    path2.PNG

    path3.PNG

    Clicking the Select button on the above dialog, opens the SysQueryForm.

    When I click "Personalise" on the SysQueryForm, I see that the caller is "WHSReleaseToWarehouseSales". WHSReleaseToWarehouseSales seems to be a query.

    Best regards,

    Frederiek

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: SysQueryForm input validation

    Hi Frederiek,

    The SysQueryForm is a generic form for building queries with ranges. It is widely used in the application. I wouldn't suggest to change this form as the tables and fields used can be any table and field, depending on where the form is opened.

    Can you indicate where you are using this advanced query form? If you open it from a report dialog, you can consider adding the validation on the dialog or add a parameter for the ship date; then you can directly validate the value.

    Please share some more background information, so we can help you better with your specific scenario.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans