locked
Can regarding be restricted to contact and company only? RRS feed

  • Question

  • Hello Everyone

    I know how to restrict the regarding to company only.

    But, can it be restricted to multiple e.g contact and company only?

    Thanks

    Friday, April 20, 2012 1:40 PM

Answers

  • Hi WPF_Dev,

    You can use a comma separated list of entity types:

    // Restrict the Regarding to only accounts and contacts
    document.getElementById("regardingobjectid").setAttribute("lookuptypes","1,2")
    document.getElementById("regardingobjectid").setAttribute("defaulttype", "1");

    hth,

    Scott


    Scott Durow
    Read my blog: www.develop1.net/public
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    • Marked as answer by WPF_Dev Friday, April 20, 2012 2:05 PM
    Friday, April 20, 2012 1:44 PM
    Answerer

All replies

  • Hi WPF_Dev,

    You can use a comma separated list of entity types:

    // Restrict the Regarding to only accounts and contacts
    document.getElementById("regardingobjectid").setAttribute("lookuptypes","1,2")
    document.getElementById("regardingobjectid").setAttribute("defaulttype", "1");

    hth,

    Scott


    Scott Durow
    Read my blog: www.develop1.net/public
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    • Marked as answer by WPF_Dev Friday, April 20, 2012 2:05 PM
    Friday, April 20, 2012 1:44 PM
    Answerer
  •  Hi 

    Call this function inside Onchange event of the lookup field :-

    function SetDefaults() {

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

    document.getElementById("lookupfieldname").setAttribute("defaulttype", "2");

    }


    • Edited by _Vikram Friday, April 20, 2012 1:48 PM
    Friday, April 20, 2012 1:45 PM