Hi,
I have one date field for which i need to set hours by following script.
function new_requesteddateonchange()
{
SetDefaultDateTimeValue('new_requesteddate');
}
function SetDefaultDateTimeValue(attributeName)
{
var attribute = Xrm.Page.getAttribute(attributeName);
attribute.setValue(attribute.getValue().setHours(12,0,0));
}
after calling function new_requesteddateonchange() i save the form and here it displays the unsaved changes.
after saving form again it removes.
Original problem removes by putting alert after
function new_requesteddateonchange()
{
SetDefaultDateTimeValue('new_requesteddate');
alert('In Onchnage');
}
Any idea?
Thanks,
Kandarp