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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

executionContext.getEventArgs().preventDefault(); not working for save and close button.

(0) ShareShare
ReportReport
Posted on by 71

Hi,

I am checking if the contact belongs to the organization (refer to image 1), if not throwing an error and cancel the save. 

I used executionContext.getEventArgs().preventDefault(); onSave event for Quick form. it didn't cancel the save. i looked at this article

https://crmtipsbyprm.wordpress.com/2020/08/01/executioncontext-geteventargs-preventdefault-is-not-working-for-save-close-button-click-dynamics-365/

Our team is trying to avoid Ribbon Workbench modification (avoid customization). Is there any other way to make this work? is any way I can disable the "Save and close " button when there is a validation error? 

image 1

pastedimage1657835159794v2.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 128 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 113

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans