CRM 2011 Set DateTime Value in JavaScript
JavaScript:
function OnLoadForm() { confirmApproval(); // OR confirmApproval2(); }
function confirmApproval() { var currentDateTime = new Date(); Xrm.Page.getAttribute("new_approvaldate").setValue(currentDateTime); }
function confirmApproval2() { var currentDateTime = new Date(); control = Xrm.Page.getControl("new_approvalddate"); attribute = control.getAttribute(); attribute.setValue(currentDateTime); }
沒有留言:
張貼留言