By default, Email Engagement is enabled at the environment level. If email engagement is enabled in your environment, every time you open an Email form, the email is automatically “followed”. This can cause issues like data noise when you simply do not want engagement to be turned on for certain users or certain forms.
Unfortunately, there is not a setting on the form itself to toggle this behavior off per form. We need to handle it with code.
The Solution: Use JavaScript
The goal is to override the out of the box email engagement fields (isemailfollowed and followemailuserpreference) so they are always disabled when the form loads.
(function (global, Xrm) {
"use strict";
global.Unanimous = global.Unanimous || {};
global.Unanimous.EmailApp = (function () {
function Form_OnLoad(executionContext) {
Unanimous. EmailApp.formContext = executionContext.getFormContext();
DisableEmailEngagement();
}
function DisableEmailEngagement() {
try {
let isEmailFollowedField = Unanimous. EmailApp.formContext.getAttribute("isemailfollowed");
let isEmailFollowed = isEmailFollowedField.getValue();
let isUserFollowingEmailField = Unanimous. EmailApp.formContext.getAttribute("followemailuserpreference");
if (isEmailFollowed !== null && isEmailFollowed !== undefined && isEmailFollowed) {
isEmailFollowedField.setValue(false);
isEmailFollowedField.setSubmitMode("always");
isUserFollowingEmailField.setValue(false);
isUserFollowingEmailField.setSubmitMode("always");
}
}
catch (error) {
console.log(error);
}
}
return {
Form_OnLoad: Form_OnLoad
}
})();
}(this, Xrm));
Let me break this down:
1. Self-Executing Function
The (function(global, Xrm) { ... }(this, Xrm)); wrapper ensures we do not pollute the global namespace, while still attaching our logic under a safe object: Unanimous.EmailApp.
- Unanimous will be replaced by your chosen namespace.
- Email App is the specific object inside of the namespace that holds email-related functions. Later, we can hook it up to the form properties. I.e., Unanimous.EmailApp.Form_Load
2. Form_OnLoad
This function runs when the form loads. It stores a reference to the form context (executionContext.getFormContext()) and calls our helper.
3. Disable Email Engagement
- Gets the Email Engagement fields (isemailfollowed and followemailuserpreference).
- Checks if the record is already marked as “followed.”
- If yes, it sets both fields to false and forces them to always submit, ensuring the system does not sneak email engagement back in.
How To Use It
- Add this script as a Web Resource in your environment.
- Include the script on the Email form where you want engagement disabled.
- In the Form Properties, register Unanimous.EmailApp.Form_OnLoad on the OnLoad event of the form.
Once this is done, every time the form opens, it will automatically reset engagement and prevent unwanted tracking.
Email Engagement Summary
While this feature can be helpful, it may not always be needed. If you do not want it automatically turned on across your entire environment, you can control it per form with a small snippet of JavaScript. With this setup, you can make sure engagement is only enabled where it is truly needed.

Working with New Dynamic
New Dynamic is a Microsoft Solutions Partner focused on the Dynamics 365 Customer Engagement and Power Platforms. Our team of dedicated professionals strives to provide first-class experiences incorporating integrity, teamwork, and a relentless commitment to our client’s success.
Contact Us today to transform your sales productivity and customer buying experiences.