Tag Cloud

CRM 2011 (161) CRM 4.0 (144) C# (116) JScript (109) Plugin (92) Registry (90) Techpedia (77) PyS60 (68) WScript (43) Plugin Message (31) Exploit (27) ShellCode (26) FAQ (22) JavaScript (21) Killer Codes (21) Hax (18) VB 6.0 (17) Commands (16) VBScript (16) Quotes (15) Turbo C++ (13) WMI (13) Security (11) 1337 (10) Tutorials (10) Asp.Net (9) Safe Boot (9) Python (8) Interview Questions (6) video (6) Ajax (5) VC++ (5) WebService (5) Workflow (5) Bat (4) Dorks (4) Sql Server (4) Aptitude (3) Picklist (3) Tweak (3) WCF (3) regex (3) Config (2) LINQ (2) PHP (2) Shell (2) Silverlight (2) TSql (2) flowchart (2) serialize (2) ASHX (1) CRM 4.0 Videos (1) Debug (1) FetchXml (1) GAC (1) General (1) Generics (1) HttpWebRequest (1) InputParameters (1) Lookup (1) Offline Plug-ins (1) OutputParameters (1) Plug-in Constructor (1) Protocol (1) RIA (1) Sharepoint (1) Walkthrough (1) Web.config (1) design patterns (1) generic (1) iframe (1) secure config (1) unsecure config (1) url (1)

Pages

Thursday, September 20, 2012

Microsoft Dynamics CRM 4.0 :Developing a Basic Silverlight Application

This section walks you through the basic steps necessary to create a project inside Microsoft Visual Studio 2008, using Microsoft Dynamics CRM data and then displaying within Microsoft Dynamics CRM. In this project, we use the Visual Studio add-in for Silverlight. In this foundation project, we build a UI component using a VS.NET project and a data access component using WCF:


1. Open Visual Studio 2008.

2. Select File, New, and then Project.

3. In the Project selection window, select Silverlight Application (as shown in Figure 1).

Figure 1. Project selection in Visual Studio 2008.

4. Click OK.

5. In the Add Silverlight Application dialog box, select Automatically Generate a Test Page to Host Silverlight at Build Time. For production release, you can attach this to an existing ASP.NET application. By default, this will create two files in the Solution Explorer:

  • App.xaml is a file used to declare shared resources such as data grids and various style objects. The code behind this file is used for handling global events such as Application_Startup, Application_Exit, and Application_UnhandledException (see Figure 2).

    Figure 2. Show sample app.xaml.
  • Page.xaml is the default file created. Typically, this is replaced with the new Silverlight page (see Figure 3).

    Figure 3. Show sample page.xaml.

Create a WCF project in the same solution. WCF is used as the communication layer for the Silverlight application. WCF supports asynchronous connections between the Silverlight application and the backend data sources. Figure 4 shows the communication sequence between the client and the backend when a user is viewing CRM notes on the Account page using Silverlight and all the steps in between.

Figure 4. Sample of the process to extract data for Silverlight.

1. Right-click the solution and create a new WCF project.

2. Click Add.

3. Select New Project.

4. Select WCF Service Application, as shown in Figure 5.

Figure 5. Select WCF Service Application.

Once the new project is attached to the solution, build the necessary connection to the CRM system, whether it is using web services or direct SQL access. Some organizations prefer direct SQL access for reading, whereas other organizations prefer to use the web services.It is recommended to use Microsoft Dynamics CRM web services to read and write data. However, if your application is only reading data, you can access the SQL views and access data very easily.

No comments: