Category Archives: D365 General
Feedback and Rating in CRM 2016 Update 1
Microsoft Dynamics Update 1, provides a new option to track the feedback and ratings for the records that are present in CRM i.e. allows customers to write feedback and track response or provide rating for a particular record. Select the Entity for which you want to track Feedback for e.g. Accounts. So a new option “Feedback” appears on General Tab under the heading of Communication and Collaboration on Entity Level. Once this option is checked it creates a 1: N Relationship between Account and Feedback Entity. So we open Account Record we can see Feedback option So now we can create a feedback for this record. The first section of the form tracks the basic details like the Title, Comments, Regarding and Source. Regarding tracks information for which the feedback is created. Source by default has two option: Internal and Portal. We can also add options as per our requirement. While the second section on the form tracks the rating for the record with three fields: Rating Minimum Rating Maximum Rating Based on the values provided on the above three fields the normalized value is calculated. By default, the business rule is written on Normalized Rating field present on header of the page. Normalized Rating field can also hold the negative rating value. This happens when the Rating value is less than the Minimum Rating Value. So the business rule can be changed according to the user requirement to avoid the negative normalized values. Also in case of multiple feedbacks a simple rollup field can be used to keep the count for number of feedbacks for that particular record. So this is how we can track the Feedback and Rating in CRM.
Share Story :
How to register Plugin Dynamically?
Problem Definition How to register the steps of the plugin Dynamically (programmatically). Introduction Generally, after the plugin development, users register the plugin and steps using plugin registration tool provided by the CRM SDK. But, in certain cases it is possible that the user may need to register the step in the plugin dynamically. For example: Whenever a new entity is added it should have an auto number step registered automatically for that entity. Description Here I have created a sample plugin with no logic. I will register this plugin programmatically using console app. To register the plugin programmatically. We need the following steps to be executed. Connect to CRM Create a record of type “pluginassembly” Create a record of type “plugintype” Create a record of type “sdkmessageprocessingstep” Connect to CRM Since we are registering the plugin using console application we need to connect the CRM instance before processing the steps. Organization service is required to create a record in CRM. Please make sure you add the below references to the code. using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Tooling.Connector; using System; using System.IO; using System.Reflection; You can refer the below code the connect with CRM public void ConnectCRM() { string connectionString = “Url=https://XXXX.crm.dynamics.com; Username=XXXX.onmicrosoft.com; Password=**********; authtype=Office365″; // Connect to the CRM web service using a connection string. CrmServiceClient conn = new CrmServiceClient(connectionString); // Cast the proxy client to the IOrganizationService interface. _orgService = (IOrganizationService)conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy; // Obtain information about the logged on user from the web service. Guid userid = ((WhoAmIResponse)_orgService.Execute(new WhoAmIRequest())).UserId; } Create a record of type “pluginassembly” Once the connection is successful, we need to register the Plugin Assembly. Here, we need to provide the physical path of the .dll that we need to register. While creating a record we need to provide the required field value which are listed below. You can find list of attributes required, by looking into the excel sheet provided by Microsoft. You can find this excel sheet in the SDK with the name “EntityMetadata” Attributes required: Code: public Guid RegisterAssembly() { string filePath = @”D:\Plugin_Dynamically\Sample.Plugin.Dynamically\Sample.Plugin.Dynamically\bin\Debug\Sample.Plugin.Dynamically.dll”; Guid assemblyId = Guid.Empty; try { var assembly = Assembly.LoadFile(filePath); string[] props = assembly.GetName().FullName.Split(“,=”.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); Entity assemb = new Entity(“pluginassembly”); assemb[“name”] = props[0]; assemb[“culture”] = props[4]; assemb[“version”] = props[2]; assemb[“publickeytoken”] = props[6]; assemb[“sourcetype”] = new OptionSetValue(0); // 0= database; assemb[“isolationmode”] = new OptionSetValue(2); // 1= none, 2=sandbox assemb[“content”] = Convert.ToBase64String(File.ReadAllBytes(filePath)); assemblyId = _orgService.Create(assemb); } catch (Exception) { throw; } return assemblyId; } Once the Assembly is registered you will able to see the below steps in plugin Creating the plugintype record A plugintype record must be created for each plugin inside the assembly. This can be done dynamically using reflection. We need to specify the below required field You can refer the below code for the registration of Plugin Type. The assemblyId is the Guid created on the earlier step. public Guid CreatePluginType(Guid assemblyId) { Guid pluginTypeId = Guid.Empty; Entity pluginType = new Entity(“plugintype”); pluginType[“pluginassemblyid”] = new EntityReference(“pluginassembly”, assemblyId); pluginType[“typename”] = “Sample.Plugin.Dynamically.Dynamic”; pluginType[“friendlyname”] = “Sample Plugin Dynamically”; pluginType[“name”] = “Register Plugin”; pluginType[“description”] = ” Sample Plugin Dynamically”; pluginTypeId = _orgService.Create(pluginType); return pluginTypeId; } This is how it will look like Creating the sdkmessageprocessingstep record At the end we need to create the step to process the request. For example, if you want to register the plugin for the create of the account entity. You need to have two id retrieved from CRM separately. Sdkmessageid: you will get this in from the sdkmessage entity you need to provide name as shown below. Sdkmessagefilterid: You will find this id using Query shown in the below screen shot You can refer the below code to perform the operation public void SdkMessageStep(Guid pluginTypeId) { Guid messageId = new Guid(“9EBDBB1B-EA3E-DB11-86A7-000A3A5473E8”); Guid messageFitlerId = new Guid(“C2C5BB1B-EA3E-DB11-86A7-000A3A5473E8”); Entity step = new Entity(“sdkmessageprocessingstep”); step[“name”] = “Sdk Message”; step[“configuration”] = “Create account record”; step[“invocationsource”] = new OptionSetValue(0); step[“sdkmessageid”] = new EntityReference(“sdkmessage”, messageId); step[“supporteddeployment”] = new OptionSetValue(0); step[“plugintypeid”] = new EntityReference(“plugintype”, pluginTypeId); step[“mode”] = new OptionSetValue(0); step[“rank”] = 1; step[“stage”] = new OptionSetValue(20); step[“sdkmessagefilterid”] = new EntityReference(“sdkmessagefilter”, messageFitlerId); Guid stepId = _orgService.Create(step); } Once the above step is executed successfully you will see the plugin as shown below Conclusion Even though we have plugin registration tool available to register the plugin using plugin registration tool we can also register the plugin programmatically in certain scenario.
Share Story :
Contractor access in PM Solution
Summary This feature enables administrator to provide access to contractor using Project Management solution. User (contractor) should be able to see only assigned projects, tasks, billing codes and easily be able to enter time against project. User will not able to see any value in money fields present on project/task/billing code. If User want to see any money related field, then administrator have ability to customize this requirement according to business need. Only system administrator and manager will able to view all fields value present on project, project task and billing code. Pre- Requisites 1. User with system administrator role in CRM 2. Project Management solution should be installed. If you don’t have solution, please contact support@cloudfronts.com or navigate to for more information. Steps 1. Create user in Office 365 and assigned CRM licenced. (e.g. CRM Essential) 2. Assigned PSM Core role and PSM Project Team Member to user. 3. We will go through two different scenarios in Project Management solution When Contractor logged into the CRM When Manager/Administrator logged into the CRM Scenario 1: When Contractor logged into the CRM In current scenario user mihir kadam(contractor) is logged in to the CRM. Mihir kadam will able to see only limited entities and web resources based on security permission. We can customize this as per requirement. Click on Project Entity to see what all details are visible to the user. Mihir kadam is able to view only one project because he has added as team member to only one project by project manager (Kuldeep Gupta). In project entity view, following fields are empty because user does not have enough permission to view this fields. 1. Actual revenue 2. Total budget If Mihir kadam want to do time entry for any project, then he has to navigate to Timesheet from project management navigation menu. Scenario 2: When Manager/Administrator logged into the CRM In current scenario user Kuldeep Gupta(Manager) is logged in to the CRM. Kuldeep Gupta will able to see all entities and web resources based on security permission. Click on Project Entity to see what all details are visible to the user. Kuldeep Gupta is able to view only all projects but modification is allowed only for owned project. Open record to view more details about project. If you notice Kuldeep Gupta is able to read all information including Total budget and actual revenue. Conclusion By using Contractor access in Project management solution any outside consultant can do time entry for ongoing project without knowing company’s actual revenue/ budget/ rate.
Share Story :
Company News Timeline for Phones and Tablets in CRM 2016 Update 1
Introduction This feature enables users to get the latest news about the customers on Phone or Tablets. Users can now view the news related to Account, Lead, Contact, or Opportunity in CRM. You can now view news related to an Account, Lead, Contact or Opportunity in the CRM app on your mobile device. The Company news timeline solution for mobile enables sales and service users to view the latest and most important news in the mobile client from Bing news. The news articles are organized by time (Today, This Week, Last Week) and contain the headline, date/time, and source of the news article. Important events are detected and categorized (including Management Changes, Earnings Releases, New Offerings, Cost Cutting, Growth, Legal Issues, Acquisitions and Partnerships). Pre- Requisites User with Global Administration Login can install the solution in the system. Steps Under Admin Centre Click on CRM. Under Manage all CRM instances, select the instance in which we want to install the solution. Below Screenshot shows the list of solutions that are either installed or uninstalled. Select the Company News Timeline solution, and then click Install. Proceed through Terms of service to accept the terms. Once the installation is completed, Users can view the news related to Account, Contact, Lead and Opportunity in CRM Mobile App. Once you enable the Company News Timeline solution, Customer Data from the address, name, and industry fields of your account records will be directed to Bing. Hence, the Customer Data sent to Bing to fetch the related data. So for example if we have Google as account, so on scrolling to the right hand side in the Mobile App we can see the section with heading as “Active News”. And Under that section user can view all the news related to that particular account. These news articles further are organized as Today, Yesterday or a week before article.
Share Story :
Enable SharePoint Integration and OneDrive for Business in CRM
The blog article tells user how to integrate SharePoint and OneDrive for Business CRM to store the CRM related documents. Let’s see the steps to enable SharePoint and OneDrive for Business. Pre–requisites User needs to be Office 365 Global Administration to enable Server Based SharePoint. User needs to have Microsoft Office 365 Plan E3. Steps to Enable SharePoint Integration Step 1: Under Default Admin Page, Select SharePoint. Under SharePoint, note down the Public Website URL. Step 2: Under Settings, select Document Management Option. Step 3: Select Enable Server Based SharePoint Integration Once step 3 is done, user needs to provide the URL that was noted in Step 1. Enter the URL and select OK. System will validate the URL provided in previous step and once the status is Valid, click Next. Below Message will be displayed saying that Server Based SharePoint Integration is completed and under Document Management Settings, setup the folders for respective entities. Step 4: Now Under Document Management Settings, select the list of entities for which document management should be enabled. Step 5: Click Next Now the user can see the status of all entities enabled for document management. Steps to Enable OneDrive for Business Note: Without Enabling Server Based- SharePoint Integration, OneDrive for Business cannot be enabled. Step 1: Under Settings, select Document Management Option. Step 2: Under Document Management, select Enable OneDrive for Business Option. Step 3: Click on Enable OneDrive for Business Option. Once OneDrive for Business is enabled, user needs to configure folder settings. i.e. user will have to setup where personal documents can be stored. Step 4: So under OneDrive for Business Folder settings, select the folder and click OK. Now say if a user wants to add documents to Account Record. User will open that account record, and then select Documents. Step 5: Under Documents Associated Grid, Upload Document. Step 6: Choose the file to Upload and in CRM folder, select OneDrive. Since the user is uploading files for the first time, he will get a confirmation box where he can change the folder location or continue using the same location as provided under Step 4. Conclusion Thus by using above simple steps, SharePoint of Integration and OneDrive for Business can be enabled in CRM to store all the CRM related Documents.
Share Story :
Salesforce → CRM real-time Integration
Introduction This article is 2nd part of the blog published earlier on CRM and Salesforce integration. In earlier blog, we have seen how we can do real-time integration from Dynamics CRM to Salesforce. In this blog we will see how to do real-time integration from Salesforce to Dynamics CRM. Requirements Let’s assume a real world example. Contoso company tracks their Accounts and Contact details in Salesforce and customer care in Dynamics CRM. So they want allow creation of Accounts and Contacts in Salesforce and those should get created in Dynamics CRM in real-time. Also, they want to handle any Account/Contact update to be reflected in Dynamics CRM. Implementation Approach Below are the steps we will follow to do this integration for an Account entity. To trigger integration from Salesforce, we will implement a workflow rule in Salesforce on an Account object. We will configure this workflow to get triggered on Account creation or update. Add an Outbound Message as an action in above workflow rule to pass the data to integration service which will actually do the integration. The integration service will be hosted on either azure environment or externally accessible web server (e.g. IIS). Once we configure outbound message, we will use the WSDL generated by outbound message and create a web service which will perform below operations: Consume the outbound message Connect to Dynamics CRM Create/update record in Dynamics CRM as per outbound message. Log integration details. In this way, we can achieve real-time integration from Salesforce to CRM without modifying any Salesforce object or without having need to understand Salesforce query language. Implementation Steps Login to Salesforce environment. Create Workflow Rule as per below screenshot (More about workflow rules). Name: Give any rule name which is easy to understand purpose of the workflow rule. Object: Select Account object as we are doing integration for Account create/update. Select Evaluation Criteria as ‘Evaluate the rule when a record is created, and every time it’s edited. In Rule Criteria section, Select Run this rule if the following as ‘formula evaluates to true’. In formula, put 1 = 1 and click on Save. We are putting this condition to allow all records and not filter any. Add an outbound message as an action as per below screenshot in the workflow rule. Name: Give any name which is easy to understand purpose of the message. Object: Select Account. Endpoint URL: <hosted web service URL with asmx extension at the end> Select Send Session ID checkbox. Select All Columns. Once created, you need to create a web service project. Use below link to do the same. https://developer.salesforce.com/page/Creating_an_Outbound_Messaging_Notification_Service_with_CSharp_and_.Net_Framework_2.0 Once you are ready with above ASMX web service, write C# code to connect to CRM and consume the Outbound message as shown in above blog. Functional Flow chart
Share Story :
Customization in Microsoft Dynamics AX 7
In past few days, we have explored more about AX 7 and came up with this blog in which we will tell you how to customize standard element in AX 7. In previous versions of AX customizing was as easy as clicking on standard element of AOT and customizing it. AX 7 is different; it allows customization in a lengthy process but is more organized. We will show you steps through which you can easily customize AX 7 elements. Here, we will customize CustTable Table by adding new field. Create a model in which you can customize CustTable element. Go to Dynamics AX menu -> Model Management -> Create Model Fill the details and click Next. Select ‘Select Existing Package’ option. Choose the package which contains the element you want to customize. Click Next. Verify details. Click Finish. This will open a new project dialog. Select ‘Dynamics AX Project’ and name it. Now, add the CustTable to newly created project. Go to AOT -> Data Model -> Tables -> CustTable Right click CustTable -> Select Customize CustTable will be added to project and will open Designer view of CustTable. Add new field. Right Click on Field -> New -> String Change the Properties. Save the changes. Right Click CustTable object browser -> Select ‘Save CustTable’. So, this is how we can customize AX 7 elements in a more organized manner. Let us know your reviews. We will soon come with more articles, as we further explore AX 7.
Share Story :
Debug Script on Tablet/Mobile Application
Introduction: After the release of Microsoft Dynamics CRM update 1, Microsoft has removed the mobile version of form and made actual form available for the Mobile/Tablet. But, since few scripts do not work on mobile/Tablet, and work fine on the Browser, Microsoft has released the guide line that should be followed while writing the scripts. Kindly refer the below link for further details on the guide lines provide by Microsoft. https://msdn.microsoft.com/en-in/library/dn481572.aspx There are scenarios where scripts break and we are not able to debug them on phone/Tablet. Which leads to no proper error tracing by the developers. Description: The script which worked perfectly fine on the Web Browser, had issues on phone/Tablet. These scripts sometimes have more than thousand lines of code and we struggle to find what exactly is causing it to fail. Microsoft, for the same reason has now come up with a solution to debug these scripts. Follow the below steps in order to debug: Step: 1 While writing script makes sure to include the ‘debugger;’ tag in the beginning of the function or where you want to debug the code. Step: 2 Create a URL which works same as that of tablet. https://<CRMURL>/nga/main.htm?org=<OrgUniqueName>&server=<CRMURL> Step: 3: For e.g. the organization URL will look like below. Unique name of the org can be obtained from Settings -> customization -> developer resource -> unique name Before opening the above mentioned URL make sure you are already logged in the web browser else the link will not work. Step 4: You will receive the below message whenever there is a change in the customization. Makes sure to download the latest changes, it will take few seconds. Step: 5 Once the download is completed you can test your script by pressing F12 button, in our case I have registered the script on change of Phone field as you can see below. As soon as the value of Phone field changes it takes me to the debugger line. (PFB the screen shot for the same) Using this approach, you can debug the script on the desktop using the tablet version of CRM. Conclusion: We can debug the mobile version of script on the web browser by the steps provided. Which will allow better debugging than the manual one that the legacy system had.
Share Story :
Interactive Service Hub
What is Interactive Service Hub? Interactive Service Dashboard is a single place where Customer Service Manager/Customer Service Representative can perform all customer service related activities. This feature is introduced in CRM Online 2016 Update and is available on CRM 2016 On Premise as well. What is not supported by Interactive Service Hub? This feature is available only on Web Browser and is not available on clients like CRM for Outlook, CRM for Phones and CRM for Tablets. Right to Left (RTL) languages are not supported. e.g. Hebrew and Arabic Third party accessibility aids such as Screen readers are not supported. Keyboard navigation is also not possible in Interactive Service Dashboard. How to access Interactive Service Hub? Below are the 3 ways in which you can access Interactive Service Hub: From CRM Notifications ribbon From Settings -> Interactive Service Hub From putting URL in browser CRM Online Environments: https://<CRM Server>.crm#.dynamics.com/engagementhub.aspx CRM On Premise Environments: <your CRM Server>/<orgname>/engagementhub.aspx Internet Facing Deployed (IFD) Environments: https://< hostname[:port]>/engagementhub.apsx. Manage Different Record Types Interactive Service Hub can be enabled for any entity. By default, it is enabled for below entities: Accounts Contacts Cases Activities: Email, Task, Appointment, Phone Call, Social Activity Queue Items Dashboards Social Profiles Entities which are enabled for mobile are also available for use in the interactive service hub, but these records are read-only. Interactive Service Hub Navigation Menu Note: Navigation bar of Interactive Service Hub is different than that of CRM. In Interactive Service Hub navigation, only those entities are shown that are enabled for Interactive Experience. Like CRM Navigation, we can go to any interactive experience enabled entity from top Menu as shown in below screenshot. When you open any record in Interactive Service Hub, you can navigate between records of the view (from where record is opened) using arrow Keys. You can also see recent records similar to CRM as shown in below screenshot Or You can create records using ‘+’ sign in navigation bar. You can use Search option to search records in Interactive Experience Enabled entities. Understand new form layouts in Interactive Service Hub Business Processes In interactive service hub, business processes are shown as a process bar on forms on top. By default, the process bar is collapsed and when user clicks on any state, its fields are popup as fly out. Default collapsed view: When user clicks on stage: Entity Forms Unlike CRM forms, in interactive service hub, tabs on forms are placed horizontally as shown in below screenshot. Entity Card For interactive service hub, new form type is introduced as Card. Card is shown as a tile in interactive service hub with most important details of the record in shorter area. Below screenshot shows how cards are shown in interactive service hub. Timeline In interactive service hub, on case record, the timeline section is added to help users in tracking all case history right within the same page without navigating to multiple places. You can create any new activity, search or filter activities in Timeline section. You can also perform quick actions on the activities right from Timeline section. You can navigate to respective activity by clicking title of an activity. Related section on entity record We can see list of related records in same page of entity record form. For cases, user can directly see knowledge articles. Dashboards My knowledge dashboard This dashboard is designed to provide an overview of knowledge base articles, e.g. number of knowledge articles and their status, etc. This helps knowledge manager in knowing about expiry month of articles, number of articles to review, etc. Stream shows data from views/ queues. In knowledge dashboard, the stream shows the active articles assigned to the author. Charts provide a count of relevant records in the streams, such as articles by status reason, articles by owner, etc. Charts can be drilled down to see details. Tiles give authors numerical values to get an idea about the status of knowledge data. We can perform actions directly from dashboards without opening record. e.g. if we want to close a case without, we can directly do so from dashboard as shown in below screenshot: Customize Interactive Service Hub Forms Supported Entities Below are the only out of box entities which are allowed for interactive service hub and are by default enabled: Account Contact Case Out-of-the-box activities (phone, task, email, appointment, and social activity) Social Profile Queue Item Knowledge Article Custom entities can be enabled for interactive experience. Entity Form Types Main – Interactive experience Only used in interactive service hub. This is the main form to which is shown when user access any entity record in interactive service hub. Card Form Only used in interactive service hub. This is the form which is shown in dashboard stream areas. Quick Create This form is shared between Dynamics CRM and Interactive Service Hub. This form is used to quickly add records and is rendered vertically at the right side of the screen in interactive service hub. Quick View This form is shared between Dynamics CRM and Interactive Service Hub. This form is used to show related information of any lookup field. Reference Link How to create/design interactive forms: https://technet.microsoft.com/library/b6df6d11-9272-4c68-b516-e12c6e701622.aspx How to customize interactive service hub: https://technet.microsoft.com/library/d1446a95-14bf-4b15-a905-72fce07f4c76.aspx Work with interactive service hub form components: https://technet.microsoft.com/en-us/library/mt622060.aspx
Share Story :
CRM → Salesforce real-time integration
Introduction We frequently come across requirements where customers use Dynamics CRM and Salesforce CRM and want to synchronize data between both the systems. We generally have requirements where data should flow back and forth from Dynamics CRM and Salesforce CRM. In this blog, I have focused on one way real time integration of Case entity from Dynamics CRM → Salesforce CRM. Requirements We have total 4 environments as per below: Dynamics CRM Development Dynamics CRM Production Salesforce CRM Sandbox Salesforce CRM Production The requirement is to perform development on development environment and then deploy the changes on production environment. There should be no code changes done on production environment and hence the solution should be configurable. Only below basic fields of Case entities should be mapped i.e. transferred from CRM Online à Case Title (Text field) Customer (Lookup of Account field) Contact (Lookup of Contact field) Description (Multiple line of Text field) Origin (Option Set) Salesforce Id (Text field – custom field to track GUID of case record created in Salesforce) Basics of Salesforce API Salesforce has list of APIs (https://developer.salesforce.com/page/Salesforce_APIs) from which we have used Partner WSDL (SOAP API). To login to Salesforce using APIs, we need to have below 3 details: User Id Password Security Token Unlike Dynamics CRM, Salesforce API uses 2 separate URLs based on environment type i.e. Sandbox/Production. Sandbox Environment uses Production Environment uses Implementation Approach To ensure no code changes on production, we have used configuration entity which will keep below configuration details: Salesforce User Id Salesforce Password Salesforce Security Token Salesforce environment Type We have used Partner WSDL to communicate between Salesforce environment and CRM Online environment. Hence based on Salesforce Environment Type, we are using login URLs. To achieve this, we have done a trick (explained below in Implementation Steps section). On create/update of Cases in CRM Online, we have written a plugin that sends data to Salesforce environment. Implementation Steps Note: I have used a separate class file that keeps all constant values. Hence whenever you find any code in all capitals, kindly replace constant values as per your requirements. Generate Partner WSDL for Salesforce environment (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_steps_generate_wsdl.htm) Create Configuration entity in CRM with below fields: Key (text) Value (text) Create a plugin class and perform below operations in the plugin. Add web reference using downloaded Partner WSDL (https://msdn.microsoft.com/en-us/library/bb628649(v=vs.100).aspx). After adding web reference, you will see reference in Solution explorer as per below. Expand Reference.map and open Reference.cs class. Locate SforceService() method and create a copy of the same with one string parameter as per below and save the file. In plugin class, fetch configuration details from Configuration entity. It should contain 4 records. Based on the environment type, pass appropriate URL to the service to authenticate with Salesforce environment. private void ConnectToSalesforce() { LoginResult currentLoginResult = null; switch (this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforceEnvironmentType.ToString()]) { case CodeConfiguration.SALESFORCE_SANDBOX_ENVIRONMENT_TYPE: this.sfdcBinding = new SforceService(CodeConfiguration.SALESFORCE_SANDBOX_WEBSERVICE_URL); break; case CodeConfiguration.SALESFORCE_PRODUCTION_ENVIRONMENT_TYPE: this.sfdcBinding = new SforceService(CodeConfiguration.SALESFORCE_PRODUCTION_WEBSERVICE_URL); break; default: throw new InvalidPluginExecutionException(CodeConfiguration.ERROR_MESSAGE_CONFIGURATION_NOT_FOUND); } currentLoginResult = this.sfdcBinding.login(this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforceUsername.ToString()], this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforcePassword.ToString()] + this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforceSecurityToken.ToString()]); this.sfdcBinding.Url = currentLoginResult.serverUrl; this.sfdcBinding.SessionHeaderValue = new SessionHeader(); this.sfdcBinding.SessionHeaderValue.sessionId = currentLoginResult.sessionId; } Once authenticated, use the session id to perform CRUD operations. Below is a sample code. Create an object of case record to be created in Salesforce sObject caseRecord = new sObject(); caseRecord.type = Case_Salesforce.LOGICAL_NAME; Create objects of attributes of the case record XmlElement[] caseFields = new XmlElement[10]; XmlDocument doc = new XmlDocument(); caseFields[counter] = doc.CreateElement(Case_Salesforce.ATTR_CASESUBJECT); caseFields[counter++].InnerText =”Any value”; caseFields[counter] = doc.CreateElement(Case_Salesforce.ATTR_CONTACT); caseFields[counter++].InnerText =”Salesforce Guid of Contact record”; caseFields[counter] = doc.CreateElement(Case_Salesforce.ATTR_ORIGIN); caseFields[counter++].InnerText =”text value of an option from picklist”; Add attributes to an object of case record caseRecord.Any = caseFields; sObject[] caseList = new sObject[1]; caseList[0] = caseRecord; Create record in Salesforce SaveResult[] results = null; results = this.sfdcBinding.create(caseList); for (int j = 0; j < results.Length; j++) { if (results[j].success) { Entity oCase = new Entity(Case_CRM.LOGICAL_NAME, this.currentEntity.Id); oCase[Case_CRM.ATTR_SALESFORCEID] = results[j].id; this.service.Update(oCase); LogIntegrationDetails(“Record Id: ” + this.currentEntity.Id.ToString(), null, (int)IntegrationLog.Status.Success); } else { for (int k = 0; k < results[j].errors.Count(); k++) { Error err = results[j].errors[k]; } } } Key Takeaways From Dynamics CRM → Salesforce, real time integration is possible using CRM plugins and Salesforce APIs. Salesforce uses different authentication URLs for different type of environments. We have handled this scenario by modifying Reference.cs class file. Configuration entity is used to make the code configurable. We are storing back GUID of case record created in Salesforce which will be used in case of update plugin.