locked
Form Order(ing) Not Working?? RRS feed

  • Question

  • I've created 2 forms for a custom entity and specified the order in which they should be displayed. I assume this means that when the user creates a new record for the entity, the default form loaded would be the form I ordered to be first. But that is not the case. Apparently, when the user chooses to create a new record, the form loaded is the one selected the last time a record for that entity was created. This is very frustrating and counter-intuitive.

    Any ideas on a workaround?

    Thanks in advance,

    Dave

    Wednesday, March 21, 2012 5:55 PM

Answers

All replies

  • Hello Dave,

    Yes, this is right, when user select to create or to open a record, loads the last form that was selected. Check this thread http://social.microsoft.com/Forums/en-US/crm/thread/7a712897-3ad4-4e36-bf11-f973a0aa1de2. Hope this will solve your issue.

    Wednesday, March 21, 2012 9:44 PM
    Answerer
  • But you can use JavaScript to set up the specific form to load up.
    FYI

    The followin is the example.

    If the form type is "Create", the default "Information" form will be displayed.

    Else depends on the field "new_formtype" which is on every form, we will show specific form.

    function onLoad()

    {

    showFormItems();

    }

    function showFormItems()
    {
    var lblShow = "Information";

    if (Xrm.Page.ui.getFormType() == 1)
    {
    lblShow = "Information";
    }
    else
    {
    if (Xrm.Page.getAttribute("new_formtype").getText() == "Form 1")
    {
    lblShow = "Form 1";
    }
    else if (Xrm.Page.getAttribute("new_formtype").getText() == "Form 2")
    {
    lblShow = "Form 2";
    }
    else if (Xrm.Page.getAttribute("new_formtype").getText() == "Form 3")
    {
    lblShow = "Form 3";
    }
    }

    if (Xrm.Page.ui.formSelector.getCurrentItem().getLabel() != lblShow)
     {
         var items = Xrm.Page.ui.formSelector.items.get();
          for (var i in items)
           {
            var item = items[i];
            var itemId = item.getId();
            var itemLabel = item.getLabel();

              if (itemLabel == lblShow)

              {
                item.navigate();
              }
      }
    }

     document.getElementById("crmFormSelector").style.display = "none";
    }


    Regards, Kyaw Kyaw Tun


    Wednesday, March 21, 2012 10:47 PM
  • hi Dave

    Adding to the above post , have look at this article  it clearly demonstrates how to setup a default form.

    http://www.resultondemand.nl/support/blog/post/Microsoft-CRM-2011-Multiple-Forms-basics.aspx

    hth

    dkay

    if the response answered your question, please take a minute and mark the response as an answer.

    • Marked as answer by DavidCRM Thursday, March 22, 2012 1:00 PM
    Wednesday, March 21, 2012 10:49 PM
  • Hi

    Did this help?

    Please make sure to mark as answer to the response that helped you get through. This will help others with similar problem identify the answer and also close this thread as resolved.

    Thanks

    Dkay

    Thursday, March 22, 2012 8:48 AM
  • Give me a chance to respond ;-)  Yes, this should work.

    Thursday, March 22, 2012 12:59 PM
  • Thanks for the response - it is helpful and I may use it in the future ;-)
    Thursday, March 22, 2012 1:00 PM