Home

Aug 11, 2013

Script to check dirty fields of CRM form

 

function forceSubmitDirtyFields() {

   var message = "The following fields are dirty: \n";

    Xrm.Page.data.entity.attributes.forEach(function (attribute, index) {

        if (attribute.getIsDirty() == true) {

            attribute.setSubmitMode('always');

         message += "\u2219 " + attribute.getName() + "\n";

        }

    });

  alert(message);

}

 

 

 

 

 

No comments: