I'm going a bit crazy.
So I have a javascript that runs when a field changes. This works just fine.
However, I don't want it to change every time the field changes, only when the field changes to a specific value.
So I'm using an if statement in the javascript, but it seems to ignore the if's and just does it every time anyway??
I've gone back to basics even and tried playing around with it.
function SetValue(){
var optValue = Xrm.Page.getAttribute("statuscode").getValue();
alert(optValue);
if (optValue = 10000003) {
alert("message 1");
}
if (optValue = 10000005) {
alert("message 2");
}
}
When I change the statuscode, it does all three alerts no matter what is picked?? Can someone help me figure out what I'm doing wrong?
Thanks,
Terry
*This post is locked for comments
I have the same question (0)