How To Fix Email Always Being Dirty
Are you facing the issue of an email form showing as dirty even after it has been saved? If you're using JS on save, the simplest solution is to put a break point in the on save to see what attributes are dirty in the console window. However, if you cannot visually see any changes, then you can try looking at the requests either in the F12 Developer Tools or in Fiddler.
In case your email description contained some HTML that was inserted via a signature template, formatting differences might be causing the issue. The spaces after semicolons and colons in the tags might be removed, quotes around numbers might be removed, and blank characters might be encoded differently, all of which can cause the email form to show up as dirty.
If you want to ignore formatting differences, you can use the supported solution explained in this post. The main function, called handleDescriptionAlwaysBeingDirty, is called onLoad of the form. It ensures that the description field is on the form, caches the initial value of the description, and sets the submit mode to “never”. Whenever the description is updated, either via a user or post save, the formatting is normalized to compare it with the normalized cached version. Finally, the submit mode is changed from “never” to “dirty”.
Note that this is not a perfect solution as it might not cover all possible formatting differences, but it works in most situations.
Visit the link for more information.
Published on:
Learn moreRelated posts
Trigger onchange event of DateTime field in power pages /power portal using JQuery
For those struggling to handle onchange events in jQuery for DateTime fields in Power Pages/Power Portal, this tutorial offers a straightforwa...
CHECKING DIRTY FIELDS IN DYNAMICS 365 USING JAVASCRIPT
In Dynamics 365, it is crucial to know which fields have been modified on the form during an update. While creating a plugin to receive data o...
Conditional Formatting with Transparency Hex Codes
Conditional formatting can be effectively implemented using transparency hex codes in field values. This tutorial explores the advantages of u...
Conditional Formatting with Field Parameters in Power BI???
This video tutorial dives into the world of conditional formatting with field parameters in Power BI. With the help of this tutorial, you'll l...
Format input values into different user input formats using Formatting API in PCF Control
If you're looking for an efficient and reliable way to format user input values in your PCF Control, you'll find the Formatting API to be an i...
SharePoint List Formatting – View Formatting / Row Formatting Samples
If you're looking to improve the user experience for Modern Lists & Libraries in SharePoint, view formatting and row formatting might be the s...
SharePoint List Formatting – Form Formatting Samples
In this post, you will learn about SharePoint List Formatting and Form Formatting Samples. Microsoft and some generous contributors have given...
Format date-time value using Formatting API in PCF Control
If you are working on a PCF Control and need to design a date-time control, this tutorial is for you. The tutorial teaches how to format the i...
Power Automate: HTML Table Formatting Made Easy
This video tutorial showcases how to format HTML tables with ease using Power Automate. The tutorial guides you through the process of designi...