Skip to main content

Notifications

Day 7: Formatting Data (Dates, Numbers) in MSCRM JavaScript

In this Blog we will see how to Formatting Data (Dates, Numbers) in MSCRM JavaScript


if (formContext.getAttribute("bosch_destinationdate").getValue() != null){
var getFullYear = formContext.getAttribute("bosch_destinationdate").getValue().getFullYear();
        var getDate = formContext.getAttribute("bosch_destinationdate").getValue().getDate();
        var getMonth = formContext.getAttribute("bosch_destinationdate").getValue().getMonth() + 1;

        formContext.getAttribute("bosch_getnumbersfromdestinationdate").setValue(getFullYear + "-" + getDate + "-" + getMonth);
}

Comments