FORM VALIDATION Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/form-validation/ Microsoft Dynamics CRM . Microsoft Power Platform Mon, 18 Dec 2017 10:33:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 FORM VALIDATION Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/form-validation/ 32 32 176351444 How to make a MS CRM form read only by Javascript http://microsoftdynamics.in/2017/12/18/how-to-make-a-ms-crm-form-read-only-by-javascript/ Mon, 18 Dec 2017 10:33:00 +0000 http://microsoftdynamics.in/2017/12/18/how-to-make-a-ms-crm-form-read-only-by-javascript/ Use this code on the page load event of MS CRM  2011/2013 function ReadOnly (){    var controls = Xrm.Page.ui.controls.get();    for (var i in controls)    {        var control = controls[i];        if (!control.getDisabled())        {            control.setDisabled(true);        }   ...

The post How to make a MS CRM form read only by Javascript appeared first on Microsoft Dynamics 365 Blog.

]]>
Use this code on the page load event of MS CRM  2011/2013


function ReadOnly ()
{
    var controls = Xrm.Page.ui.controls.get();
    for (var i in controls)
    {

        var control = controls[i];
        if (!control.getDisabled())
        {
            control.setDisabled(true);
        }
    }
}

SOURCE : mscrm.com

The post How to make a MS CRM form read only by Javascript appeared first on Microsoft Dynamics 365 Blog.

]]>
2769
USE HTML CODE USING JAVASCRIPT IN MSCRM 2011 , MSCRM 2013 http://microsoftdynamics.in/2014/02/19/use-html-code-using-javascript-in-mscrm-2011-mscrm-2013/ Wed, 19 Feb 2014 14:08:00 +0000 http://microsoftdynamics.in/2014/02/19/use-html-code-using-javascript-in-mscrm-2011-mscrm-2013/ function pwd_onchange() {     var fieldTable1 = Xrm.Page.getAttribute( “new_password”).getValue();     fieldTable1.innerHTML = ‘<input tabIndex=”1050″ class=”ms-crm-Text” id=”new_password” style=”ime-mode: auto;”  type=”password” maxLength=”100″ _events=”[object Object]” control=”[object Object]” attrName=”new_password” req=”0″/>’;     Xrm.Page.getAttribute(“new_password” ).setValue(Xrm.Page.getAttribute(“new_password”).innerHTML); } SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post USE HTML CODE USING JAVASCRIPT IN MSCRM 2011 , MSCRM 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>


function pwd_onchange() {
    var fieldTable1 = Xrm.Page.getAttribute( “new_password”).getValue();
    fieldTable1.innerHTML = ‘<input tabIndex=”1050″ class=”ms-crm-Text” id=”new_password” style=”ime-mode: auto;”  type=”password” maxLength=”100″ _events=”[object Object]” control=”[object Object]” attrName=”new_password” req=”0″/>’;
    Xrm.Page.getAttribute(“new_password” ).setValue(Xrm.Page.getAttribute(“new_password”).innerHTML);
}





SOURCE : JUST2CODE.IN
Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post USE HTML CODE USING JAVASCRIPT IN MSCRM 2011 , MSCRM 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
2837
FORM VALIDATION ( MOBILE , PHONE NO , ZIPCODE ) USING JAVASCRIPT IN MSCRM 2011 , 2013 http://microsoftdynamics.in/2014/02/18/form-validation-mobile-phone-no-zipcode-using-javascript-in-mscrm-2011-2013/ Tue, 18 Feb 2014 12:59:00 +0000 http://microsoftdynamics.in/2014/02/18/form-validation-mobile-phone-no-zipcode-using-javascript-in-mscrm-2011-2013/ //mobile number field function permanentnumber() {     var mob = Xrm.Page.getAttribute( “Filedname”).getValue();     var length = mob.length;     if (length < 10 || length > 10) {         alert( “Please Enter 10 Digit Number:” );         Xrm.Page.getAttribute( “Filedname“).setValue(null );         return true;     }     if (mob > 31 && (mob < 48 || mob > 57)) { }     else {         alert( “Please Enter 10 Digit Number:” );         return true;     } } //——————————————————————————————————————————————–...

The post FORM VALIDATION ( MOBILE , PHONE NO , ZIPCODE ) USING JAVASCRIPT IN MSCRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
//mobile number field
function permanentnumber() {
    var mob = Xrm.Page.getAttribute( “Filedname”).getValue();
    var length = mob.length;
    if (length < 10 || length > 10) {
        alert( “Please Enter 10 Digit Number:” );
        Xrm.Page.getAttribute( Filedname).setValue(null );
        return true;
    }
    if (mob > 31 && (mob < 48 || mob > 57)) { }
    else {
        alert( “Please Enter 10 Digit Number:” );
        return true;
    }
}
//——————————————————————————————————————————————–
//phone number field
function phonenumber() {

    var phonenumber = Xrm.Page.getAttribute( Filedname).getValue();
    if (phonenumber != null) {
        var length = phonenumber.length;
        if (length < 8 || length > 12) {
            alert( “Please Enter a Valid Digit Number:” );
            Xrm.Page.getAttribute( Filedname).setValue(null );
            return true;
        }
        if (phonenumber > 31 && (phonenumber < 48 || phonenumber > 57)) { }
        else {
            alert( “Please Enter a Valid Digit Number:” );
            return true;
        }
    }
}
//——————————————————————————————————————————————–
//zipcode
function zipcode() {
    var zipcode = Xrm.Page.getAttribute( Filedname).getValue();
    var length = zipcode.length
    if (length < 6)
        alert( “Please Enter Valid Zipcode:”);

    if (zipcode > 31 && (zipcode < 48 || zipcode > 57)) { return false; }
    else {
        alert( “Please Enter Valid Zipcode:”);
        return true;
    }
}


SOURCE : JUST2CODE.IN
Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post FORM VALIDATION ( MOBILE , PHONE NO , ZIPCODE ) USING JAVASCRIPT IN MSCRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
2838