if(Xrm.Page.getAttribute("COLUMN1").getValue() == true ||
Xrm.Page.getAttribute("COLUMN2").getValue() == true ||
Xrm.Page.getAttribute("COLUMN3").getValue() == true ||
Xrm.Page.getAttribute("COLUMN4").getValue() == true)
{
// Make "Email ID" required
Xrm.Page.getAttribute("emailIDColumn").setRequiredLevel("required");
}
else
{
// Make "Email ID" NOT required
Xrm.Page.getAttribute("emailIDColumn").setRequiredLevel("none");
}
Try the above, you only need to specify 'if' once
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk