JCRRIPT Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/jcrript/ 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 JCRRIPT Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/jcrript/ 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
How to Create Dynamic OptionSet in MS Dynamics CRM 2011 & 2013 dynamics365 http://microsoftdynamics.in/2017/12/18/how-to-create-dynamic-optionset-in-ms-dynamics-crm-2011-2013-dynamics365/ Mon, 18 Dec 2017 10:29:00 +0000 http://microsoftdynamics.in/2017/12/18/how-to-create-dynamic-optionset-in-ms-dynamics-crm-2011-2013-dynamics365/ How to Create Dynamic OptionSet in MS Dynamics CRM 2011 & 2013 This code will help you……………… function dynamicoptionset() { //get value in no in variable     var totaldivision = Xrm.Page.getAttribute(“fieldname” ).getValue();     if (totaldivision == null || totaldivision == “” )         return;     else {         var optionsetControl = Xrm.Page.ui.controls.get( “new_division” );         var options = optionsetControl.getAttribute().getOptions();         optionsetControl.clearOptions();         for ( var i = 0; i < totaldivision; i++) {             optionsetControl.addOption(options[i]);         }    ...

The post How to Create Dynamic OptionSet in MS Dynamics CRM 2011 & 2013 dynamics365 appeared first on Microsoft Dynamics 365 Blog.

]]>
How to Create Dynamic OptionSet in MS Dynamics CRM 2011 & 2013

This code will help you………………
function dynamicoptionset() {

//get value in no in variable
    var totaldivision = Xrm.Page.getAttribute(“fieldname” ).getValue();
    if (totaldivision == null || totaldivision == “” )
        return;
    else {
        var optionsetControl = Xrm.Page.ui.controls.get( “new_division” );
        var options = optionsetControl.getAttribute().getOptions();

        optionsetControl.clearOptions();
        for ( var i = 0; i < totaldivision; i++) {

            optionsetControl.addOption(options[i]);
        }
    }
}


SOURCE : mscrm.com

The post How to Create Dynamic OptionSet in MS Dynamics CRM 2011 & 2013 dynamics365 appeared first on Microsoft Dynamics 365 Blog.

]]>
2771
Passing URL to Iframe , Get and Set url to iframe using javascript in mscrm 2011 http://microsoftdynamics.in/2014/02/20/passing-url-to-iframe-get-and-set-url-to-iframe-using-javascript-in-mscrm-2011/ Thu, 20 Feb 2014 07:47:00 +0000 http://microsoftdynamics.in/2014/02/20/passing-url-to-iframe-get-and-set-url-to-iframe-using-javascript-in-mscrm-2011/ //Passing URL to Iframe function iffffff() {     var IFrame = Xrm.Page.ui.controls.get( “IFRAME_iframes” );     //url value will  be saved in Url variable     var Url = IFrame.getSrc();     alert(Url);     //add new url or add subs to the existing     var trget = Url + “/movie” ;     alert(trget);     //set new value to iframe     IFrame.setSrc(trget);     //test what is new url     var IFramee = Xrm.Page.ui.controls.get( “IFRAME_iframes” );     var Urls = IFrame.getSrc();...

The post Passing URL to Iframe , Get and Set url to iframe using javascript in mscrm 2011 appeared first on Microsoft Dynamics 365 Blog.

]]>
//Passing URL to Iframe
function iffffff() {

    var IFrame = Xrm.Page.ui.controls.get( “IFRAME_iframes” );
    //url value will  be saved in Url variable
    var Url = IFrame.getSrc();
    alert(Url);
    //add new url or add subs to the existing
    var trget = Url + “/movie” ;
    alert(trget);
    //set new value to iframe
    IFrame.setSrc(trget);
    //test what is new url
    var IFramee = Xrm.Page.ui.controls.get( “IFRAME_iframes” );

    var Urls = IFrame.getSrc();
    alert(Urls);
}




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

The post Passing URL to Iframe , Get and Set url to iframe using javascript in mscrm 2011 appeared first on Microsoft Dynamics 365 Blog.

]]>
2836
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
COPY MULTIPLE FIELD VALUES TO ANOTHER FIELDS USING JAVASCRIPT MS CRM 2011 , 2013 http://microsoftdynamics.in/2014/02/14/copy-multiple-field-values-to-another-fields-using-javascript-ms-crm-2011-2013/ Fri, 14 Feb 2014 07:53:00 +0000 http://microsoftdynamics.in/2014/02/14/copy-multiple-field-values-to-another-fields-using-javascript-ms-crm-2011-2013/ //When Both Address are same function WhenSameAddress(){var check = Xrm.Page.getAttribute(“new_bothaddressaresame”).getValue() ;if(check==true){//Get Values from Correspondence Addressvar street1 = Xrm.Page.getAttribute(“new_castreet1”).getValue() ;var street2 = Xrm.Page.getAttribute(“new_castreet2”).getValue() ;var street3 = Xrm.Page.getAttribute(“new_castreet3”).getValue() ;var country = Xrm.Page.getAttribute(“new_cacountry”).getValue() ;var state = Xrm.Page.getAttribute(“new_castate”).getValue() ;var city= Xrm.Page.getAttribute(“new_cacity”).getValue() ;var pincode = Xrm.Page.getAttribute(“new_capincode”).getValue() ;//alert(street1 + street2 + street3);//Set values to permanent AddressXrm.Page.getAttribute(“new_pastreet1”).setValue(street1);//Xrm.Page.getControl(“new_pastreet1”).setFocus(true);Xrm.Page.getAttribute(“new_pastreet2”).setValue(street2);Xrm.Page.getAttribute(“new_pastreet3”).setValue(street3);Xrm.Page.getAttribute(“new_pacountry”).setValue(country);Xrm.Page.getAttribute(“new_pastate”).setValue(state);Xrm.Page.getAttribute(“new_pacity”).setValue(city);Xrm.Page.getAttribute(“new_papincode”).setValue(pincode);}else{Xrm.Page.getAttribute(“new_pastreet1”).setValue(‘ ‘);//Xrm.Page.getControl(“new_pastreet1”).setFocus();Xrm.Page.getAttribute(“new_pastreet2”).setValue(‘ ‘);Xrm.Page.getAttribute(“new_pastreet3”).setValue(‘ ‘);Xrm.Page.getAttribute(“new_pacountry”).setValue();Xrm.Page.getAttribute(“new_pastate”).setValue();Xrm.Page.getAttribute(“new_pacity”).setValue();Xrm.Page.getAttribute(“new_papincode”).setValue();}} SOURCE :...

The post COPY MULTIPLE FIELD VALUES TO ANOTHER FIELDS USING JAVASCRIPT MS CRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>

//When Both Address are same

function WhenSameAddress()
{

var check = Xrm.Page.getAttribute(“new_bothaddressaresame”).getValue() ;
if(check==true)
{
//Get Values from Correspondence Address
var street1 = Xrm.Page.getAttribute(“new_castreet1”).getValue() ;
var street2 = Xrm.Page.getAttribute(“new_castreet2”).getValue() ;
var street3 = Xrm.Page.getAttribute(“new_castreet3”).getValue() ;
var country = Xrm.Page.getAttribute(“new_cacountry”).getValue() ;
var state = Xrm.Page.getAttribute(“new_castate”).getValue() ;
var city= Xrm.Page.getAttribute(“new_cacity”).getValue() ;
var pincode = Xrm.Page.getAttribute(“new_capincode”).getValue() ;
//alert(street1 + street2 + street3);
//Set values to permanent Address

Xrm.Page.getAttribute(“new_pastreet1”).setValue(street1);
//Xrm.Page.getControl(“new_pastreet1”).setFocus(true);
Xrm.Page.getAttribute(“new_pastreet2”).setValue(street2);
Xrm.Page.getAttribute(“new_pastreet3”).setValue(street3);
Xrm.Page.getAttribute(“new_pacountry”).setValue(country);
Xrm.Page.getAttribute(“new_pastate”).setValue(state);
Xrm.Page.getAttribute(“new_pacity”).setValue(city);
Xrm.Page.getAttribute(“new_papincode”).setValue(pincode);



}
else
{
Xrm.Page.getAttribute(“new_pastreet1”).setValue(‘ ‘);
//Xrm.Page.getControl(“new_pastreet1”).setFocus();
Xrm.Page.getAttribute(“new_pastreet2”).setValue(‘ ‘);
Xrm.Page.getAttribute(“new_pastreet3”).setValue(‘ ‘);
Xrm.Page.getAttribute(“new_pacountry”).setValue();
Xrm.Page.getAttribute(“new_pastate”).setValue();
Xrm.Page.getAttribute(“new_pacity”).setValue();
Xrm.Page.getAttribute(“new_papincode”).setValue();


}
}


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

The post COPY MULTIPLE FIELD VALUES TO ANOTHER FIELDS USING JAVASCRIPT MS CRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
2855
Set Fields Disable in an entity using JavaScript MS – CRM 2011 , 2013 http://microsoftdynamics.in/2014/02/14/set-fields-disable-in-an-entity-using-javascript-ms-crm-2011-2013/ Fri, 14 Feb 2014 07:47:00 +0000 http://microsoftdynamics.in/2014/02/14/set-fields-disable-in-an-entity-using-javascript-ms-crm-2011-2013/ function SetFieldDisable(){var Empcode = Xrm.Page.getAttribute(“new_employeecode”).getValue();if(Empcode != null){Xrm.Page.ui.controls.get(“new_employeecode”).setDisabled(true);}}SOURCE : JUST2CODE.INSubscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post Set Fields Disable in an entity using JavaScript MS – CRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
function SetFieldDisable()
{
var Empcode = Xrm.Page.getAttribute(“new_employeecode”).getValue();
if(Empcode != null)
{

Xrm.Page.ui.controls.get(“new_employeecode”).setDisabled(true);
}
}

SOURCE : JUST2CODE.IN

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

The post Set Fields Disable in an entity using JavaScript MS – CRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
2856