Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 87499

xrm weirdness?

$
0
0

Hello - Please see the test script below. For some reason test 1 and test 2 don't recognize the selected subject as "Return/Cancellation" but test 3 works successfully:

    var selectedVal = crmForm.all.subjectid.DataValue[0].name;         //test 1 = false     alert('is return/cancel = ' + selectedVal == 'Return/Cancellation');

    //test 2 = false     alert('is return/cancel upper = ' + selectedVal.toUpperCase() == 'RETURN/CANCELLATION');

    //test 3 works     var selectedSubjectValue = crmForm.all.subjectid.DataValue[0].name;     if (selectedSubjectValue.toUpperCase() == "RETURN/CANCELLATION") { alert ('final test works'); }

My question is why does test 1 and test 2 not recognize the selected value but test 3 works successfully? 

Theoretically, shouldn't all 3 test results eval to true?


Viewing all articles
Browse latest Browse all 87499

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>