Skip to content

Instantly share code, notes, and snippets.

@Kyle-Muir
Last active November 4, 2015 21:04
Show Gist options
  • Save Kyle-Muir/c25bbbb87b8f627319ee to your computer and use it in GitHub Desktop.
Save Kyle-Muir/c25bbbb87b8f627319ee to your computer and use it in GitHub Desktop.
Get all dirty fields in CRM 2011
var attributes = Xrm.Page.data.entity.attributes.get(), dirtyFields = [];
for (var i in attributes) {
var attribute = attributes[i];
if (attribute.getIsDirty()) {
dirtyFields.push(attribute.getName());
}
}
console.log(dirtyFields.join(', '));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment