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());
}

Advertisements

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s