locked
setDefaultView on Appointment requiredattendees RRS feed

  • Question

  • Hello,

    I am attempting to set default view for requiredattendees field of Appointment to "Active Contacts". I apply

    Xrm.Page.getControl("requiredattendees").setDefaultView("00000000-0000-0000-00AA-000010001004"); //Active Contacts
     view

    After, Account Lookup View is still selected. How to change it to Active Contacts?

    Kavesh

    Tuesday, September 10, 2013 1:27 PM

Answers

  • I added

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

    which now makes the Active Contacts be selected as default view.

    • Marked as answer by KSingh_CRM Wednesday, September 11, 2013 6:44 AM
    Wednesday, September 11, 2013 6:44 AM

All replies

  • Appears that you are setting the default view but will also have to mention teh default entity type to be contact. Refer to this post by Rhett. You would also find the comments on this post useful.

    If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'

    Tuesday, September 10, 2013 1:49 PM
  • I added

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

    which now makes the Active Contacts be selected as default view.

    • Marked as answer by KSingh_CRM Wednesday, September 11, 2013 6:44 AM
    Wednesday, September 11, 2013 6:44 AM