Monday, March 28, 2016

Validate date MSCRM Javascript

function ValidateDates() {
    var Date1 = Xrm.Page.getAttribute("scheduledstart").getValue();
    var Date2 = Xrm.Page.getAttribute("scheduledend").getValue();
    if (Date1 != null && Date2 != null) {
        if (Date1.setHours(0, 0, 0, 0) < Date2.setHours(0, 0, 0, 0)) {
            alert("You must specify an end time that happens after the start time");
        }
    }
}

No comments:

Post a Comment

How to Run Microsoft Flow for Every one Month

Introduction: In this Blog we will see how to Run Microsoft Flow for Every one Month. Implementation Steps:   1. Navigate to  https://make.p...