Wednesday, September 25, 2024

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

In this Blog we will see 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);
}





No comments:

Post a Comment

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...