Michael Philip's Blog

Writing about MS Tech with strong focus on Azure & CRM

MS CRM 2011 – What is the “IsDirty” Method ?

2 Comments

Hi,

The “IsDirty()” Method returns a Boolean value indicating if there are unsaved changes to  attributes values.

Code:

//To Check if the entity is dirty
var ismodified=Xrm.Page.data.entity.getIsDirty();

//To Get Dirty Fields
var attributes = Xrm.Page.data.entity.attributes.get() ;
for (var i in attributes)
{
var attribute = attributes[i];
if (attribute.getIsDirty())
alert(“attribute dirty: ” + attribute.getName());
}

2 thoughts on “MS CRM 2011 – What is the “IsDirty” Method ?

  1. Pingback: When to automatically change fields using Javascript – Hosk's Dynamic CRM Blog

  2. Pingback: Hosk's Dynamic CRM 2011 Blog

Leave a comment