Showing posts with label field. Show all posts
Showing posts with label field. Show all posts

Saturday, January 16, 2016

Quick way to know what's dirty on CRM form

Here is a quick way to know what fields are dirty on CRM form by a single click.



Put this line of code into step 5


javascript: var form = $("iframe").filter(function() {    return $(this).css("visibility") == "visible"})[0].contentWindow;try {    form.Mscrm.InlineEditDataService.get_dataService().validateAndFireSaveEvents = function() {        return new MscrmSaveResponse(5, "")    }} catch (e) {}var attrs = form.Xrm.Page.data.entity.attributes.get();for (var i in attrs) {  if(attrs[i].getIsDirty())   console.log(attrs[i].getName());}


Finally, to use it