In Dynamics 365, there is a common need to identify which fields have been modified on the form during an update.
One way is by creating a Plugin that will receive data of the modified fields in the current update event.
However, the purpose of this article is to check how to identify the modified fields through JavaScript.
It is done by verifying if the form or fields are in a dirty state which indicates if they have been changed.
Three methods are available that you can use to get if the form or specific fields are dirty.
Check if form is dirty to verify if any field on the form has been changed.
Using the function getIsDirty, you can check if any field on the form has been modified.
formContext.data.entity.getIsDirty();
This function will return true if the form is dirty, false otherwise.
Check if a field is dirty to verify if a specific field on the form has been changed.
formContext.getAttribute(“schema-field-name”).getIsDirty();
This function will return true if the field is dirty, false otherwise.
Display all the modified fields to verify what fields on the form have been changed.
formContext.data.entity.getDataXml();
This function will get the list of attributes that have been modified on the form with the values of each field.
A Xml result having a parent tag and inner elements where the root tag contains the entity logical name and the inner tags contain the fields’ logical name with the current value of each field.
CHECKING DIRTY FIELDS IN DYNAMICS 365 USING JAVASCRIPT



Niice post. I was checking continuously this blog and I’m impressed!
Very useful info specifically tthe last part
🙂 Icare for sjch information much. I was looking for
this certain information for a very long time. Thank you and good luck. https://Www.Waste-Ndc.pro/community/profile/tressa79906983/
Nice post. I was checking continuously this blog and I’m impressed!
Very usful info specifically the lasst part :
) I care for such information much. I was looking for this certain information ffor a very long time.
Thank you and good luck.
Here is my homepage; https://Www.Waste-Ndc.pro/community/profile/tressa79906983/