locked
ISSUE: Xrm.Page.ui.formSelector.items returns EMPTY in CRM2013 RRS feed

Answers

  • Hi,

    I saw a similar issue with the RC1 build - but it has been fixed with the RTW/Online version.

    hth,

    Scott


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, October 15, 2013 6:28 PM
    Answerer

All replies

  • Hi There.

    There are several things to notice here using the method:

    1. When there is only one form available the Xrm.Page.ui.formSelector.items Collection is empty and the getCurrentItem method will return null.

    2. Only those forms that share an association with one of the user’s security roles are available in this collection. This collection provides methods to retrieve or perform actions on each of the forms, including the ability to navigate to a specific form.

    3. The Xrm.Page.ui.formSelector.items collection used to access these items is not available with Microsoft Dynamics CRM for tablets.

    Make sure your code meets all the conditions to use in CRM 2013

    Regards,

    Jaimie

    Tuesday, October 15, 2013 2:18 PM
  • Hi Jaimie,


    All conditions are satisfied. Same code is working on CRM2011 UR12.
    1) Using CRM2013 on premise
    2) User is Administrator
    3) There are 2 forms available in Account record UI.<o:p></o:p>

    Code snippet:
    // check if the form id exist for this user and if does not exist throw a handled exception message
    //sFormId is Guid of new form which is available on form UI too.
    if (!IsNull(Xrm.Page.ui.formSelector.items.get(sFormId)))
    {
    Xrm.Page.ui.formSelector.items.get(sFormId).navigate();
    }<o:p></o:p>


    Tuesday, October 15, 2013 4:15 PM
  • Hi,

    I saw a similar issue with the RC1 build - but it has been fixed with the RTW/Online version.

    hth,

    Scott


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, October 15, 2013 6:28 PM
    Answerer
  • Thanks Scott.

    I am working on CRM2013 trial version therefore this issue could be because of it.

    I have tested on CRM2013 Online and this problem DOES NOT persist. I will check on RTW bits later.

    Wednesday, October 16, 2013 11:39 AM