function DateAdd() {
//Get today date
var Today = new Date();
//Get the date
var DateSentOut = Xrm.Page.data.entity.attributes.get("DateFieldName").getValue();
//Set based on days,months and years
//Date.setMonth(month,day) / if year add with 12 month like that
DateSentOut.setMonth(DateSentOut.getMonth() + 3); //Add 3 Months Duration
//Set the field answer.
Xrm.Page.data.entity.attributes.get("AnswerFieldName").setValue(DateSentOut);
}
CRM 2011 Javascript Date Add With Duration Based On Month, Year And Days
Posted by Unknown at 6/13/2012 04:19:00 pm
Labels: CRM 2011
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment