如何清除日期字段?crm 2011 javascript設置日期字段爲空
下面的代碼似乎並沒有工作:
if (Xrm.Page.getAttribute("new_boolfield1").getValue() != null) {
switch(Xrm.Page.getAttribute("new_boolfield1").getValue()) {
case false:
Xrm.Page.getAttribute("new_datefield1").setValue(null); // this doesn't work
Xrm.Page.getAttribute("new_datefield1").setValue(); // this doesn't work either
case true:
Xrm.Page.getAttribute("new_datefield1").setValue(new Date());
}
}
你是對的,打破了缺失 –