I have the following script, but when I select a date in the SlideDeckDueDate Field I get and error that says, "Object doesn't support property or method 'getText' at SlideDeckDueDateOnChange." I just want to check to see if this field contains data, and if so, then make other fields required. What am I doing wrong?
function SlideDeckDueDateOnChange()
{
var SlideDeckDueDate = Xrm.Page.getAttribute("nhs_slidedeckduedate").getText();
if (SlideDeckDueDate == null || SlideDeckDueDate =='undefined' || SlideDeckDueDate =='')
{
Xrm.Page.getAttribute("nhs_currenttimeframe").setRequiredLevel("none");
Xrm.Page.getAttribute("nhs_previoustimeframe").setRequiredLevel("none");
}
else if (SlideDeckDueDate != null && SlideDeckDueDate != 'undefined' && SlideDeckDueDate !='')
{
Xrm.Page.getAttribute("nhs_currenttimeframe").setRequiredLevel("required");
Xrm.Page.getAttribute("nhs_previoustimeframe").setRequiredLevel("required");
}
}
*This post is locked for comments
I have the same question (0)