locked
Filter Regarding Lookup of Activity(Task) RRS feed

  • Question

  • How to filter Regarding lookup on Task Entity , now it is showing many entity Types on lookup for selecting record but i want to display only Account ,Contact when user select this lookup.

    See below screenshot for your persual

    Wednesday, September 5, 2012 11:33 AM

Answers

  • Hi,

    write the following code in js file and call that js in u r task entity form Onload event...

    function javascript()

    {

    //To restrict the types in party list

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

    //to set the default type
    document.getElementById("regardingobjectid").setAttribute("defaulttype", "1");

    }

    in above code 1,2 is Entity Type Code


    • Proposed as answer by Gugan Wednesday, September 5, 2012 12:29 PM
    • Edited by Gugan Wednesday, September 5, 2012 12:33 PM
    • Marked as answer by Prashanth MirJ(MJ) Thursday, September 6, 2012 5:54 AM
    Wednesday, September 5, 2012 12:29 PM
  • hi,

    use this on Onload of your entity

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


    Please don't forget to Vote and marked as answer If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise

    Wednesday, September 5, 2012 3:21 PM

All replies

  • Hi,

    write the following code in js file and call that js in u r task entity form Onload event...

    function javascript()

    {

    //To restrict the types in party list

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

    //to set the default type
    document.getElementById("regardingobjectid").setAttribute("defaulttype", "1");

    }

    in above code 1,2 is Entity Type Code


    • Proposed as answer by Gugan Wednesday, September 5, 2012 12:29 PM
    • Edited by Gugan Wednesday, September 5, 2012 12:33 PM
    • Marked as answer by Prashanth MirJ(MJ) Thursday, September 6, 2012 5:54 AM
    Wednesday, September 5, 2012 12:29 PM
  • hi,

    use this on Onload of your entity

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


    Please don't forget to Vote and marked as answer If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise

    Wednesday, September 5, 2012 3:21 PM
  • Hi Gugan,

    Thanks for your answer,It's working.

    Thursday, September 6, 2012 5:54 AM