330 likes | 483 Views
Extending Microsoft Dynamics™ CRM 4.0. Chapter 8 – Client Extensions. Overview. Customizing the navigation structure using SiteMap Integrate Web content into the Microsoft Dynamics CRM user interface using ISV.Config
E N D
Extending Microsoft Dynamics™ CRM 4.0 Chapter 8 – Client Extensions
Overview • Customizing the navigation structure using SiteMap • Integrate Web content into the Microsoft Dynamics CRM user interface using ISV.Config • Control the availability of user-interface extensions within the Microsoft Dynamics CRM for Microsoft Office Outlook clients • Add IFrames to display external content within entity forms • Use the Microsoft Dynamics CRM Design Guide to apply an appropriate look and feel to custom Web pages • Launch Microsoft Dynamics CRM forms from an external application
Lesson: Customizing the User Interface • Main Application Window • First thing you see when you load Microsoft Dynamics CRM
Customizing the User Interface • The Entity Interface • When you load an individual entity or select New Entity
Customizing the User Interface • Modifying the User Interface • SiteMap.xml • Navigation bar • Navigation pane in the Main Application window • ISV.config • Everything else
Customizing Site Map • Controls • Navigation structure of Microsoft Dynamics CRM • Placement and order of pages within the application navigation structure • Defines • Areas represented in the Web client's Navigation Pane • Workplace profiles
Customizing Site Map • Site Map Structure
Customizing Site Map • SiteMap nested elements • SiteMap • Root node for the SiteMap • Takes a URL that defines the Outlook client URL to render • Area • Controls the individual panes found in the Navigation pane • Add or remove Areas • Override the default labels by using the Title attribute • Change the Icon to point to a different image • Group • Organizes elements in the workplace area • SubArea • Represents the items in the Navigation pane that show new content • Privilege • Controls if a sub-area is displayed for a user
Customizing Site Map • To edit SiteMap • Export SiteMap • Make your changes • Import the updated XML file • Import tool performs validations on the SiteMap • Error in the SiteMap could render the Navigation pane unusable • Recover from errors http://< your server name> /tools/systemcustomization/ImportCustomizations/ importCustomizations.aspx
Demonstration – Add External Site • Shows how to add an external site to Microsoft Dynamics CRM. • Uses a site created in a previous Lab to represent an “external” site. • Scenario • A company had a custom Web page created that showed Account data in a custom grid. • They now want to have that Web site integrated into Microsoft Dynamics CRM so that users do not have to navigate away.
Lesson: Using ISV.Config • XML file you export and import to modify • Allows you to add: • Custom menus • Side tabs • Buttons • Three main elements off the Configuration element: • Root • Configure application-level menus, buttons and NavBarItems • Entities • Configure the menus, toolbars, NavBars and grids for each entity • includes custom entities • Service Management • Configure the colors that identify status of service appointments
Using ISV.Config • The Root Element • Configure application level menus, buttons and NavBarItems • Nested elements to configure each type of control
Using ISV.Config • The Entities Element • Name attribute specifies the entity’s name. • Structure resembles the Root element with two additions. • NavBarItem attribute • Contains an Area attribute that groups NavBarItems by area. • Grid attribute • Defines menus and buttons for the list view of the entity .
Using ISV.Config • The Entities Element
Using ISV.Config • Service Management Element • Customize these colors of time blocks in Service Management. • Provides a mapping to the .css file that defines them. • .css files are located at <Install path>\SM\Gantt\style\GanttControl.css.
Using ISV.Config • Customizing Navigational Elements • Left Navigation Pane • Add items to the left navigation pane in each entity window • Use the NavBar element • Tool Bar • Customize the main toolbar or the toolbar in any entity detail form • Menu • Add items to the menu bar • Using the MenuItem element
Using ISV.Config • Enabling Customizations • To enable the customizations, set the Custom menus and toolbars option in the Customization area of the System Settings found in the Settings Area under Administration.
Lab 8.1 – Creating Custom Menus and Buttons • Organization is building a customer portal. • Customers accessing the portal will have usernames and passwords. • Store these on the contact form but do not display them because they are encrypted. • Add a button to Reset Password • When a customer needs to reset a password. • User clicks the button and opens a dialog to change the password.
Lesson: Customization and the Outlook Client • Integrate SiteMap and ISV.config customizations with the Outlook client. • List the available integration points with the Outlook client. • Describe the customizations you can use to integrate your application with the client.
Customization and the Outlook Client • Most of what you do in SiteMap.xml and ISV.Config involves linking to URLs. • To work in the Outlook client, the: • User must be online. • User must have access to the site. • Attributes to control if and when an option shows up in the Outlook client: • AvailableOffline • Client • You can set these attributes on the following elements: • SiteMap.xml SubAreas element • ISV.Config Button, Menu Items, and Navigation Areas elements
Customization and the Outlook Client • Global menu bar • Add menus between the Tools and Help menus • URL opens in new window or dialog box • Detail form menu bar • Add menus between the Actions and Help menus • URL opens in new window • Detail form toolbar • Add buttons to the toolbar • URL opens in new window • Detail form navigation pane • Add side tabs to the navigation pane • URL opens in view pane
Lesson: Using IFrames in Entity Forms • An IFrame is an inline or floating frame. • Insert it within an HTML document. • Uses: • Loading a Web form • Displaying another Web site • Displaying a dynamic Web application • Displaying dynamic help
Using IFrames in Entity Forms • Determine if IFrames are appropriate. • Write code to handle situations where you do not want to load the URL. • IFrames load asynchronously. • The CRM Form hosting the IFrame may load and be interactive before the IFrame finishes loading. • Use care when using an IFrame to replace an individual cell or control on the form. • Placing a lot of IFrames on a form slows performance.
Using IFrames in Entity Forms Considerations: • Determine if IFrames are appropriate. • Write code to handle situations where you do not want to load the URL. • IFrames load asynchronously • The CRM Form hosting the IFrame may load and be interactive before the IFrame finishes loading. • Use care when using an IFrame to replace an individual cell or control on the form. • Placing a lot of IFrames on a form slows performance.
Using IFrames in Entity Forms Using Parameters • IFrame can pass parameters • Object type • GUID • Organization Name • Adds parameters to the URL as part of a querystring • Without parameters, the URL would be: http://myAccountLookupApp.aspx • With Parameters, the URL would be: http://myAccountLookupApp.aspx?typename=account&id=<GUID>&orgname=<OrganizationName>
Using IFrames in Entity Forms • IFrame can be dynamic: • Change the src attribute • Sets a URL to be loaded by an IFRAME • Use code in the OnLoad event of the Account form to load the Account Web site in to an IFrame • Reference Form Field values • Modify the target Web site to contain script that pulls data off of the CRM form • Cannot reference crmForm by name • Reference it by index. use parent.document.forms[0]
Using IFrames in Entity Forms • Referencing crmForm Field Values Example function WorkWithParentCrmForm() { // Get a pointer to the CrmForm var oCrmForm = window.parent.document.forms[0]; if (oCrmForm) { // We are hosted by the Account form – // Get the Account's Name alert("The Account Name is " + oCrmForm.all.name.DataValue); } }
Using the Microsoft Dynamics CRM Design Guide • To build applications that emulate the appearance of Microsoft Dynamics CRM • Covers • Styles • Colours • Spacing • Fonts • User Interface Style Guide • Develop a Cascading Style Sheet to use with the application • <link rel="stylesheet" type="text/css" href="template.css">
URL Addressable Forms and Views • Each form is a Web page with its own URL. • You can call these pages directly to open forms. • Useful for linking CRM data from custom Web applications or through portals such as SharePoint. • Use the window.open() method.
URL Addressable Forms and Views • Each form is a Web page with its own URL. • Can call these pages directly to open forms. • To open an account create form, navigate to: http://<server name>/SFA/accts/edit.aspx • To open an account edit form, specify the object ID: http://<server name>/SFA/accts/edit.aspx?id=<object id> http://<server name>/SFA/accts/edit.aspx?id= {1F8B6FC0-426A-4122-BAC2-A05B6071FC57}
Lab 8.2 – Create a Task with Default data • Scenario • The Customer Service Department wants to modify Microsoft Dynamics CRM to include a Create Priority Task button from the Case Form. • It wants some default data in the task based on information from the Case. • Use a pattern that enables more buttons to be defined to specify other default data options.
Review Customizing the navigation structure using SiteMap. Integrate Web content into the Microsoft Dynamics CRM user interface using ISV.Config. Control the availability of user-interface extensions within the Microsoft Dynamics CRM for Microsoft Office Outlook clients. Add IFrames to display external content within entity forms. Use the Microsoft Dynamics CRM Design Guide to apply an appropriate look and feel to custom Web pages. Launch Microsoft Dynamics CRM forms from an external application.
Test Your Knowledge Perform the Test Your Knowledge quiz.