locked
steps to open silverlight application from ms dynamic crm RRS feed

  • Question

  • I have place one button in dashboards ribbon in ms dynamic crm 2011. I have created one simple silverlight application. Please provide me exact steps to open this application on button click which i have added.
    Thursday, May 10, 2012 4:36 AM

Answers

  • Hi nxtkim,

    You can refer to this tutorial on how to setup your Silverlight application to run as a Web Resource. http://xrmbits.com/building-silverlight-web-resources-for-crm-2011part-1/

    You also need to create HTML file that will host the Silverlight xap and also host this in Web Resource.

    Once you've done this, you can hook up the click event of the Ribbon button to open up the URL of the HTML file.

    window.open('<Microsoft CRM URL>/WebResources/<name of Web resource>');

    I hope this helps. If my response answered your question, please mark the response as an answer.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Thursday, May 10, 2012 5:00 AM

All replies

  • Hi nxtkim,

    You can refer to this tutorial on how to setup your Silverlight application to run as a Web Resource. http://xrmbits.com/building-silverlight-web-resources-for-crm-2011part-1/

    You also need to create HTML file that will host the Silverlight xap and also host this in Web Resource.

    Once you've done this, you can hook up the click event of the Ribbon button to open up the URL of the HTML file.

    window.open('<Microsoft CRM URL>/WebResources/<name of Web resource>');

    I hope this helps. If my response answered your question, please mark the response as an answer.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Thursday, May 10, 2012 5:00 AM
  • how to take click event of the Ribbon button to open up the URL of the HTML file.
    Thursday, May 10, 2012 5:40 AM
  • You will need to update your Ribbon XML Definition file to include the JavaScriptFunction action. See below.

    You will need to pass in the name of Javascript Web Resource that contains the click handler.

    <CommandDefinition Id="CRM.opportunity.Form.CommandButtonOpenDialog">
       <DisplayRules>
          <DisplayRule Id="CRM.opportunity.form.FormStateNotNew.DisplayRule" />
       </DisplayRules>
       <Actions>
          <JavaScriptFunction Library="$webresource:new_oportunityscript.js" FunctionName="OpenSilverlight" />
       </Actions>
    </CommandDefinition>

    Then, inside the javascript file, all you need to do is to create the click handler. In this case, we'll call it OpenSilverlight.

    function OpenSilverlight() {
       window.open('<Microsoft CRM URL>/WebResources/<name of Web resource>');
    }

    I hope this helps. If my response answered your question, please mark the response as an answer.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Thursday, May 10, 2012 5:56 AM
  • giving error while importing zip file

    The ribbon item 'GT.account.Form.Star.Command' is
    dependent on <DisplayRule
    Id="GT.account.Form.FormStateNotNew.DisplayRule" />

    Thursday, May 10, 2012 6:38 AM
  • Hi nxtkim,

    The DisplayRule is there for reference purposes only. The bits that are important is the JavascriptFunction.

    Easiest way to modify Ribbon is to use third party tools such as Visual Ribbon Editor (http://crmvisualribbonedit.codeplex.com/)


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Thursday, May 10, 2012 6:41 AM
  • thanks.

    it's work.

    I removed displayrule tag and set action tag as follows:

    <Actions>
         
    <JavaScriptFunction Library="$webresource:new_oportunityscript.js" FunctionName="OpenSilverlight" />
      
    </Actions>

    Thursday, May 10, 2012 7:09 AM