I have a simple javascript function to clear all the fields on the form. I execute it on a multi select value change. The problem is that it also clears the multi select value. I can't stop it from doing this. Here is my code, I try
to only clear the field if it is not equal to the actual field triggering the event. Where am I messing this up?
function ClearAllFields() {
var attributes = Xrm.Page.data.entity.attributes.get();
for (var i in attributes) {
if (attributes[i].getName !="vs_feescheduletype")
{
attributes[i].setValue(null);
}
}
}