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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to add a customized validation in Save button in VendEditInvoice form in D365 FO

(1) ShareShare
ReportReport
Posted on by 52

Hi Everyone,

Is it possible to add a custom validation whenever a user will click the save button of VendEditInvoice form? I have tried already to create event handler class on some part of the form, like the validateWrite() of the datasource but it doesn't satisfied some of the requirements. I really need to put it to Save. 

screenshot-save-button.PNG

Hope you someone can help me on this

Thanks in advance!

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    236,570 Most Valuable Professional on at
    RE: How to add a customized validation in Save button in VendEditInvoice form in D365 FO

    I'm afraid we want be able to design a solution that satisfies your requirements if you don't tell us what the requirements are.

    As far as I know, all what the button does is saving the data source. If it's not what you want, maybe you need to re-think your design.

    By the way, do you realize that there are other ways of saving the data besides clicking the button? For example, I can press Alt+S or close the form. If you put your logic on the button, it won't work in all cases.

  • Verified answer
    WillWU Profile Picture
    22,361 on at
    RE: How to add a customized validation in Save button in VendEditInvoice form in D365 FO

    Hi knives1991,

    Agree with Martin, you should not put your code on the button.

    What are your actual requirements? If you want to validate a field on the form, you could create try the validataField eventhandler on the table.

  • knives1991 Profile Picture
    52 on at
    RE: How to add a customized validation in Save button in VendEditInvoice form in D365 FO

    Hi Martin, Thank you for your input.

    Understood your point and that make sense. I have found a workaround on this and changed some of the design.

  • CU23010927-0 Profile Picture
    6 on at
    How to add a customized validation in Save button in VendEditInvoice form in D365 FO
    Hi  knives1991,
    I am looking for the same solution. Can You explain how you did it?
     

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 783

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 715 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 519 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans