Hi,
I am doing a validation using javascript to check base on a lookup field condition. If the condition fails I need to reset the lookup field back to null.
I have reviewed other examples but I have not been able to fix the error message. The field is getting set back to null. However the following error message continues to display "Cannot read property '0' of null when the lookup field".
I changed over to "Legacy Form Rending" and the error message went away. I do not want to use Legacy Form Rending even though that fixed my problem.
Here's by following code.
Xrm.Page.getAttribute("new_calibrationid").setRequiredLevel("none"); if (Xrm.Page.getAttribute("new_calibrationid").getValue() != null) { Xrm.Page.getAttribute("new_calibrationid").setValue(null); } Xrm.Page.getAttribute("new_calibrationid").setRequiredLevel("required");
Any ideal on how to fix this error message?
*This post is locked for comments