Daily Archives: November 28, 2014

JavaScript Upgrade Gotcha #5: = does not equal ==

I run into this occasionally when converting Dynamics CRM 4.0 JavaScript into the 2011 object model. Consider this piece of code: if ((crmForm.all.new_field1.DataValue >= 3) && (crmForm.all.new_field1.DataValue <= 10)) { sitetotal = 2; } else if (crmForm.all.new_field1.DataValue > 10) { sitetotal = 3; } else if (crmForm.all.new_field1.DataValue = 0) { sitetotal = 0; } Can […]

Continue reading