Skip to main content

Posts

Showing posts with the label SharePoint and Dynamics CRM integration

SharePoint 2007 Integration With Dynamics CRM - Solution - Part 2

OK, here's the Part 2 of the solution I proposed here . We will develop a custom Web part which will display number of application forms in CRM posted from SharePoint Web site in the form of Key Performance Indicator – assume there is a target for number of application forms. We will also assume for this sample that the application form in our case will be the task which we create in CRM when new application is submitted from the SharePoint Web site. Solution 1. Create a Web part and add the Web Reference to point to the CRM Server Web Service. For CRM 3.0 it will be http://your_server:5555/mscrmservices/2006/crmservice.asmx, for CRM 4.0 it will be http://your_server:5555/mscrmservices/2007/crmservice.asmx 2. Add the following properties to the Web part class: private string _sCrmWebUrl = ...; [Personalizable(PersonalizationScope.Shared), WebBrowsable(true), WebDisplayName("CRM Web Server URL"), Category("Custom Properties")] public string CrmWebUrl { get...

SharePoint 2007 Integration With Dynamics CRM - Solution - Part 1

The Scenario An organization has relationships with third-parties. Accounts, customers, members, suppliers etc. The organization has a SharePoint Web site and Dynamics CRM where the information about third-parties is processed. As the current business process dictates, large number of external clients - agents in this sample - needs to contact organization via email, fax, regular mail or in person in order to submit important business information - applications in this scenario. We will create a public SharePoint Web site where agents can submit applications and then those applications will be copied automatically to Dynamics CRM and when their processing in CRM is finished some feedback will be published back to the SharePoint Web site and agents will be able to see the status of the application in CRM online on the SharePoint Web site. We defined the solution design as below: In order to get the solution we defined the following tasks: 1. Develop a custom SharePoint Workflow which w...

SharePoint 2007 Integration With Dynamics CRM - Preamble

SharePoint is a mighty platform and it has a lot of features. One of the main advantages of SharePoint is that it can be a central place of information presence in the organization. Central means other line of business applications can be integrated with SharePoint in order to expose essential business data or to consume SharePoint capabilities as an information management tool. As an example of the integration between SharePoint and business application I'm going to publish a set of articles illustrating integration of Dynamics CRM and SharePoint in order to solve business issues, increase business process efficiency and decrease costs. In this example I will demonstrate how to leverage SharePoint collaboration, workflow, extensibility and other features. Scenario An organization has relationships with third-parties. Accounts, customers, members, suppliers etc. The organization has a SharePoint Web site and Dynamics CRM where the information about third-parties is processed. As th...

Dynamics CRM API - Essentials

Here is the information about how to create certain type of entities in Dynamics CRM 3.0 using API. For version 4.0 could be some changes and they will be pointed out specifically. Create a contact public Guid CreateContact() { CrmService service = new CrmService(); service.Url = ...; service.Credentials = System.Net.CredentialCache.DefaultCredentials; Guid gResult = Guid.Empty; try { contact mycontact = new contact(); mycontact.firstname = ...; mycontact.lastname = ...; ... // provide other attributes gResult = service.Create(mycontact); } catch (System.Web.Services.Protocols.SoapException soapex) { ... } catch (Exception ex) { ... } return gResult; } Create a task in regard to the contact private Guid CreateActivityForContact(Guid gContactId) { Guid gResult = Guid.Empty; CrmService service = new CrmService(); service.Url = ...; service.Credentials = Syst...

Dynamics CRM API: QueryExpression In Use

During the recent SharePoint 2007 and Dynamics CRM 3.0 integration project I have come across the issue using QueryExpression class of Dynamics CRM API. Consider the following scenario: 1. We need to search for the contact in CRM using API and following criteria: contact first name and last name are equal to the values provided by search functionality or email is equal to the value provided by search functionality - email = email_value OR (first name = first_name_value AND last name = last_name_value) 2. If contact exists then we just use the identifier to do something with that contact if not exists - create the contact Initially I wrote the following code to retrieve the desired contact: string sEmail = ...; // initialize email value string sFirstName = ...; // initialize first name string sLastName = ...; // initialize last name try { QueryExpression queryContact = new QueryExpression(); queryContact.EntityName = "contact"; queryContact.ColumnSet = new AllColum...