AX – D365FO – How to stop a form from closing in OKButton_Clicked Posted on 31 August 2021 by Marco Saad //You can try this . if(Field.value == ' ' ) { throw error (" Fill in the fields"); } Share this:LinkedInFacebookTwitterLike this:Like Loading... Published by Marco Saad View all posts by Marco Saad