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

pre-populating date fields exluding weekends

$
0
0

I think this should be possible but was wondering how you would do this? I expect the changes for be in this line...

" var endDate = new Date().setDate(now.getDate()+3); "

but instead of now do I just change it to Saturday?

function SetDateto3Days()

{

   if(Xrm.Page.ui.getFormType() == 1)

   {

       var dueDate = Xrm.Page.data.entity.attributes.get("new_date");

       var now = new Date();

       var endDate = new Date().setDate(now.getDate()+3);

       dueDate.setValue(endDate);

   }

}


Viewing all articles
Browse latest Browse all 87499

Trending Articles



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