Different from the previous
sections in which we used Microsoft SharePoint as the primary
application to display CRM data, this section illustrates how to use
Microsoft Dynamics CRM to display data from SharePoint (which can contain CRM data if properly integrated).
IFrame Integration Using Static and Dynamic Data from SharePoint
There
are two possible options for IFrame integration:
Static IFrame Integration
Static
IFrame integration is useful when you have to show some static
information with each entity (for example, if you want to display, as a
tab within the form for accounts, account-naming best practices, or if
you want to show the standard opportunity management best practices on
the Opportunity screen). Figure 1 shows a sample IFrame integration.
You can also use static SharePoint integration
to embed SharePoint Search in Microsoft Dynamics CRM.
Another common use for static SharePoint
integration is for viewing dashboards made in SharePoint. You can build a
dashboard using Excel Services, BDC, and PerformancePoint in SharePoint
and display that as an integrated view in Microsoft Dynamics CRM.
In the following example, we show you how to
integrate a dashboard. Once the Dashboard is ready and built in SharePoint, get the appropriate link to the dashboard.
To view the new dashboard, you need to customize Microsoft Dynamics CRM to include the dashboard, as follows:
1. | Open the Microsoft Dynamics CRM application.
|
2. | Select Customizations from the left navigation pane.
|
3. | Select Export Customizations.
|
4. | |
5. | Select Export Select Customization, and save the file in an easy accessible location.
|
6. | Unzip the recently saved file and extract customization.xml.
|
7. | Open the customization.xml in Visual Studio 2008.
|
8. | Add the following line under the kbarticle entity:
<SubArea Id="Dashboard" Title="Dashboard"
Url="http://SharePointServer/CRMDashboard" Icon="/_imgs/
bar_bottom_ico_reports.gif " />
|
9. | Save and close the file.
|
10. | Open the Microsoft Dynamics CRM application.
|
11. | Select Customizations from the left navigation pane.
|
12. | Select Import Customizations.
|
13. | Select Browse, and locate the recently modified file.
|
14. | Select Upload.
|
15. | Select Import Selected Customizations.
|
Now when you refresh the CRM application, there will be a new link under Articles, as shown in Figure 2
Dynamic IFrame Integration
Dynamic IFrame integration is very similar to
static IFrame integration with one major difference: The dynamic
integration has a referential link between the two systems that enable
users to view record-sensitive data.
For example, when a user opens an account
screen, you can create some custom tabs to show additional information
from a remote application in the same screen (shown in Figure 3).
In the following example, we show you how to open a SharePoint screen
that has some web parts that are being filtered by a URL parameter.
Before we begin this example, ensure that the
SharePoint dashboard can accept URL parameters and can filter the data
on the required web parts using the Connections feature in SharePoint.
To set up this feature in Microsoft Dynamics CRM, follow these steps:
1. | Open the Microsoft Dynamics CRM application.
|
2. | Select Customizations from the left navigation pane.
|
3. | Select Customize Entities.
|
4. | Open the Accounts entity.
|
5. | Select Forms and Views.
|
6. | Open the form.
|
7. | Select Add a Tab from the Common Tasks located on the right side.
|
8. | Give it a name (for example, SharePoint Account Dashboard), and then click OK.
|
9. | Navigate to the new tab created.
|
10. | Select Add a Section, and give it a friendly name (for example, SharePointSection). Then click OK.
|
11. | Select the new IFrame created.
|
12. | Select Add an IFrame with the following properties:
Name: SharePointIFrame
URL: about:blank
|
13. | Select Form Properties from the Common Tasks list located on the right side.
|
14. | Select OnLoad.
|
15. | Click Edit.
|
16. | Enter the following code:
crmForm.all.tab4Tab.onclick = function()
{
if(crmForm.all.IFRAME_ SharePointIFrame.url.length < 15)
{
crmForm.all.IFRAME_iBASE.url =
"http://SharePointServer/CRMDashboard?AccountNumber=" +
crmForm.all.accountnumber.value;
}
}
|
17. | Click OK.
|
18. | Select Save and Close to save the form modifications. Select Save and Close to save the entity modifications.
|
19. | Select the Accounts entity, and then select Publish, to deploy the changes.
The preceding steps will pass the Account Number value to the
SharePoint site as a URL variable. The URL variable can be used to
filter the data on web parts created using BDC connections.
Note
The preceding steps
will dynamically set the URL property of the IFrame. Using this
technique will help optimize initial page load times, and will help
preserve end-user experience.
|