Hi all,
I have to compare actual date with today for example.
today = 25/11/2016
actual date = 18/11/2016
the difference between two date is 7 than I have to run report otherwise not. How can I do that?
Thank you
*This post is locked for comments
Hi all
I fulfill my requirement with that line Opportunity.EstimatedCloseDate BETWEEN TODAY() AND DATE_ADD(NOW(), INTERVAL 7 DAY)
Thank you
Hi Mark Christie
I am writing code on report builder. Please suggest me on that site.
Thank you
Hi,
You can use something similar to
function DateDiff() {
var startDate = Xrm.Page.getAttribute('actualstart').getValue();
var endDate = Xrm.Page.getAttribute('actualend').getValue();
// to cancel the error when undefined
if (start == undefined || start == null || end == undefined || end == null) {
return;
}
// Get 1 day
var day = 1000 * 60 * 60 * 24;
// Get time in days
var time = ((end - start) / day) + 1;
// Can't be less than 0.
if (time < 0)
time = 0;
// Set the duration
Xrm.Page.getAttribute('actualdurationminutes').setValue(time);
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156