![]() |
#1 |
Участник
|
Neil McDonald: Add a CRM Calendar to a dashboard
Источник: http://xrmrocks.com/add-crm-page-as-...to-a-dashboard
============== Dashboards in Dynamics CRM 2011 are a great way to visualize data. Did you know that they can also be used to view pretty much any other web content? I’ve recently had a requirement to add the CRM Calendar to a dashboard. I could have simply added a list of appointment activities to the dashboard, but the actual calendar control looks a lot nicer. To do this, first we need to get the URL of the Calendar page. Load up the IE developer tools (F12 in IE9) and start a profiler. Now navigate to the calendar in CRM and click on ‘Month’, ‘Week’ and ‘Day’ (we want the URL for each page). ![]() Stop the profiler and take a look at the results ![]() As you can see, we’ve got the URLs of the 3 calendar views needed for the dashboard. The URL seems to contain a parameter for the current date in ISO8601 format (YYYY-MM-DDThh:mm:ss). We’ll have to deal with that inside of our web resource. Now we need to create the web resource which we'll add to the dashboard. We’ll create a simple HTML page with an iframe containing the calendar. We'll also provide some simple navigation to choose between the daily, weekly or monthy calendars. Edit: Some of the onclick code in the links is refusing to display properly below. You can either copy and paste it using the 'Copy to clipboard' link or view the real code here. Day Week Month The loadCal() JavaScript function allows us to pass in the calendar type and changes the iframe according to the selected type. When the dashboard first loads, the monthly calendar will be displayed. 3 links appear above the iframe allowing the user to choose which calendar they want to view. The ISODateString() function has been borrowed from Mozilla in order to get the date into the correct format. Now we need to add our HTML page to the web resource. Edit your dashboard and click on Insert ‘Web Resource’ ![]() Now click on the lookup and select ‘New’ from the popup window. Give your resource a name, an optional description and a type of ‘Web Page (html)’. Click on the Upload File ‘Browse’ button and select the HTML file which we’ve just created. ![]() Click on ‘Save’ and then ‘Preview’. You should now see a working preview of the calendar page. ![]() Close the preview and click on Publish. Once the Publish has completed, just Save and Close the window. Now just fill in the rest of the web resource form and click Ok ![]() You should now be back at the Dashboard designer where you can position and resize your web resource as required. Save and Close when done and take a look at your new dashboard! ![]() As you can see, using the IE developer tools, some simple HTML and JavaScript, you can add a number of items to a dashboard which may not be obvious when using the dashboard designer. Permalink | Leave a comment » Источник: http://xrmrocks.com/add-crm-page-as-...to-a-dashboard
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|