locked
Freeze account Entity Option In Filter Lookup on Case Entity RRS feed

  • Question

  • Hi All

    I have a system Lookup (Customer) on Case Entity, When i select Lookup More Records It Is Allowing me to select either Account Or Contact Entities

    My Requirement is By default Should be Account Entity Only To display, It would not allow to select Contact Entity in that drop down list

    By Default Account Entity Should Be Freeze 

    Please Help Me to Do this 

    Thanks

    siva

    Wednesday, May 7, 2014 4:31 PM

Answers

  • HI All

    I found the Solution for 

    Freeze account Entity Option In Filter Lookup on Case Entity

    Simpl Follow the Code and run this On-Lode Event

    1)document.getElementById("customerid_i").setAttribute("lookuptypes", "1"); OR 2) document.getElementById("customerid_i").setAttribute("lookuptypes", "1"); document.getElementById("customerid_i").setAttribute("lookuptypenames", "account:1"); document.getElementById("customerid_i").setAttribute("lookuptypeIcons", "/_imgs/ico_16_1.gif"); document.getElementById("customerid_i").setAttribute("defaulttype", "1"); OR

    3)var CID = document.getElementById("customerid_i");

    CID.setAttribute("lookuptypes", "1");

    CID.setAttribute("defaulttype", "1");

    The result look like the bottom


    SRKD0808

    • Marked as answer by SRKD0808 Monday, May 12, 2014 10:22 AM
    Monday, May 12, 2014 10:10 AM

All replies

  • Hi,

    Check this


    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    • Proposed as answer by HIMBAPModerator Thursday, May 8, 2014 12:52 AM
    • Unproposed as answer by SRKD0808 Thursday, May 8, 2014 9:23 AM
    Thursday, May 8, 2014 12:52 AM
    Moderator
  • Hi Mahender Pal

    Thanks For replying with good script 

    But I am using Dynamics CRM 2013 and I used this Peace of code before on Online & On premises Version Of CRm 2013

    It is not working in this scenario and I tried The following 3 ways of Code Scripts as well But Use less

    1) Xrm.Page.ui.controls.get("customerid").$0_3._element.allowFilterOff = 0;

    2) document.getElementById("customerid").setAttribute("lookuptypes", "1");

    3) document.getElementById("customerid").setAttribute("lookuptypes", "1");
        document.getElementById("customerid").setAttribute("lookuptypenames", "account:1");
        document.getElementById("customerid").setAttribute("lookuptypeIcons", "/_imgs/ico_16_1.gif");
        document.getElementById("customerid").setAttribute("defaulttype", "1");

    and your one

    4) 

    var ctrl = document.getElementById("customerid");
    ctrl.setAttribute("lookuptypes", "2");
    ctrl.setAttribute("defaulttype", "2");

    this is the screen shot

    I have to See Only Account, Not Contact, Freeze the Account Option Please 

    Please Help me to solve this problem 

    Thanks In Advance 


    SRKD0808





    • Edited by SRKD0808 Thursday, May 8, 2014 1:22 PM
    Thursday, May 8, 2014 9:51 AM
  • HI All

    I found the Solution for 

    Freeze account Entity Option In Filter Lookup on Case Entity

    Simpl Follow the Code and run this On-Lode Event

    1)document.getElementById("customerid_i").setAttribute("lookuptypes", "1"); OR 2) document.getElementById("customerid_i").setAttribute("lookuptypes", "1"); document.getElementById("customerid_i").setAttribute("lookuptypenames", "account:1"); document.getElementById("customerid_i").setAttribute("lookuptypeIcons", "/_imgs/ico_16_1.gif"); document.getElementById("customerid_i").setAttribute("defaulttype", "1"); OR

    3)var CID = document.getElementById("customerid_i");

    CID.setAttribute("lookuptypes", "1");

    CID.setAttribute("defaulttype", "1");

    The result look like the bottom


    SRKD0808

    • Marked as answer by SRKD0808 Monday, May 12, 2014 10:22 AM
    Monday, May 12, 2014 10:10 AM