Launch Form on Button Click

Answered Launch Form on Button Click

  • quinta-feira, 3 de maio de 2012 12:41
     
     

    I have added a button to the ribbon but now I want to launcha form when I click the button.

    I have two froms in my entity, from A and form B.

    I want to launch form A when I click the button.

    Does anyone now how I can get the url for form A?

    Thanks.

Todas as Respostas

  • quinta-feira, 3 de maio de 2012 12:49
     
     Respondido
    • Marcado como Resposta JMcCon quinta-feira, 10 de maio de 2012 15:05
    •  
  • quinta-feira, 3 de maio de 2012 13:00
     
     Respondido

    use the following code

    function showForm(_FormName) {
        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 == _FormName) {
                item.navigate();
            }
        }
    }

    Just pass "Form A" to above function

    Let us know if you need more help on this....


    • Editado _Vikram quinta-feira, 3 de maio de 2012 13:01
    • Marcado como Resposta JMcCon quinta-feira, 10 de maio de 2012 15:05
    •  
  • sexta-feira, 4 de maio de 2012 13:44
     
     

    I can't get this to work.

    I have been able to open the form using a URL but it keeps opening the last form type that was opened as the system records this.

    Anyone know how I can specify the exact form using URL ?