locked
Required Attendees default value in crm 2011 RRS feed

  • Question

  • Hi,

    I have  a java script that  needs to be converted to 2011 , but i couldn't find how to convert.Below is the script 

        crmForm.all.requiredattendees.defaulttype = "1"; How to convert  this javascript to( XRM.page ........) CRM 2011 syntax

    This is in appointment entity. Any help would be appreciated.

    Thanks,

    Abhishek


    Abhishek


    • Edited by Abhisinha17 Monday, February 23, 2015 9:40 AM Update
    Monday, February 23, 2015 9:31 AM

All replies

  • document.getElementById("Required Attendees field name").setAttribute("defaulttype", "1");


    Regards, Saad


    • Edited by Mohd Saad Monday, February 23, 2015 11:04 AM
    Monday, February 23, 2015 10:16 AM
  • Check this example
    function preFilterLookup() {    
     
    Xrm.Page.getControl("to").addPreSearch(function () {
     
       addLookupFilter();
     
     });
     
    }
     
    function addLookupFilter() {
     
    fetchXml = "<filter type='and'><condition attribute='isdisabled' operator='eq' uitype='systemuser' value='0' /></filter>";
     
    document.getElementById("to_i").setAttribute("defaulttype", "8");
     
       document.getElementById("to_i").setAttribute("lookuptypes", "8");
     
       document.getElementById("to_i").setAttribute("lookuptypeIcons", "/_imgs/ico_16_8.gif");
     
    document.getElementById("to_i").disableViewPicker = 1;
     
    Xrm.Page.getControl("to").addCustomFilter(fetchXml);
     
    }
     
    //add these lines before your control addCustomFilter(fetchXML)
     
    document.getElementById("to_i").setAttribute("defaulttype", "8");
     
       document.getElementById("to_i").setAttribute("lookuptypes", "8");
     
       document.getElementById("to_i").setAttribute("lookuptypeIcons", "/_imgs/ico_16_8.gif");
    



    Regards Faisal


    • Edited by Faisal Fiaz Monday, February 23, 2015 10:55 AM
    Monday, February 23, 2015 10:54 AM
  • Faisal I think your script is for CRM 2013

    Regards, Saad

    Monday, February 23, 2015 11:02 AM
  • Yes it's for 2013

    Abhishek

    Tuesday, February 24, 2015 2:09 AM