Create a dialog pop-up box

Dotaz Create a dialog pop-up box

  • 1. května 2012 9:31
     
     

    I have 2 forms in my entity. Form A and form B.

    I want that when I click the New button for my entity that a prompt will appear asking the user do they want to create a New Form A or Form B.

    If the user selects From A then a Form A will open up for them to create and vice versa.

    Anyone know how I can do this?

    Thanks.

Všechny reakce

  • 1. května 2012 9:55
    Moderátor
     
     

    Hi,

    you can try to hide OOB button , from application toolbar and entity toolbar and try create a custom ribbon button and call a js webresource to ask user and based on response open entity form. (I have not done this personally, it's just an idea)

    refer : http://msdn.microsoft.com/en-us/library/gg328483.aspx

    https://community.dynamics.com/product/crm/crmtechnical/b/xrmavanade/archive/2011/06/10/crm-2011-form-navigation.aspx

    HTH


    Mahain : Check My Blog
    Follow me on Twitter
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.


  • 1. května 2012 11:06
     
     
    Your idea seems ok but how to it is my problem.
  • 1. května 2012 11:49
     
      Obsahuje kód

    Hi JM,

    you need to create a custom ribbon button....try to Launch a html page with two buttons on it to say Form A or Form B. onclick of buttons should redirect to open the respective forms through javascript window.open()...use global context to get the server url. Below is the example to open a contact through javascript.

    function FormA() { // example for contact entity
        var extraqs = "firstname=form1contact";
        extraqs += "&formId=***put form guid";   
        //Set features for how the window will appear
        var features = "location=no,menubar=no,status=no,toolbar=no,resizable=1";
        // Open the window
        window.open(Xrm.Page.context.getServerUrl() + "/main.aspx?etn=contact&pagetype=entityrecord&extraqs=" +
         encodeURIComponent(extraqs), "_blank", features, false, width=400,height=200);
    }

    With standard javascript and html you should be able to do the job!

    Hope this helps you!

    Thanks

    Sama


    SAMA

  • 1. května 2012 14:23
    Moderátor
     
     

    you can use Ribbon editor to create ribbon button if you are concerned, how to create ribbon button

    you can ribbon editor to add ribbon : http://ribboneditor.codeplex.com/


    Mahain : Check My Blog
    Follow me on Twitter
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • 2. května 2012 13:23
     
     

    I have setup a ribbon button and it opens a html page.

    I would like to put 2 separate URL links on the html page. I want each URL to point to each of the forms in the Entity i.e. one points to Form A and the other points to From B.

    Does anyone know how to get the URL for a Form within the entity?

    Thanks.