Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Form save displays unsaved changes after calling On Change event .

$
0
0

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 

 


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>