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

Javascript TypeError: Cannot read properties of null (reading 'getValue')

$
0
0

Dear All,

I am new to CRM and trying to develop a functionality to show or hide 'MultiSelect choice' field based on the value from other field. Since there is a limitiation to achieve this using CRM business rule, I tried using JS to achieve this functionality. But I am facing below error when trying to do this using JS. I have checked all the word spellings and everything is correct.

TypeError: Cannot read properties of null (reading 'getValue')

Please find my below JS code. Is it possible to advise what needs to be corrected please?

function HideorShowAccessibilityAdjustments(executionContext)

{
var formContext = executionContext.getFormContext();
if (formContext.getAttribute("mntr_areanyreasonableadjustmentsrequired").getValue()!=0) {
formContext.getAttribute("mntr_AccessibilityAdjustments").setVisible(true);
formContext.getAttribute("mntr_NonAccessibilityAdjustments").setVisible(true);
}
else if (formContext.getAttribute("mntr_Areanyreasonableadjustmentsrequired").getValue()!=1) {
formContext.getAttribute("mntr_AccessibilityAdjustments").setVisible(false);
formContext.getAttribute("mntr_NonAccessibilityAdjustments").setVisible(false);
}
}

Thank You,

Gowtham


Viewing all articles
Browse latest Browse all 46379

Trending Articles



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