-
Continue reading →: JScript to Create record and its related record using Web API – CRM 2016
Below is the script snippet to create ‘Account’ record using Web API. function createAccount() { var clientUrl = Xrm.Page.context.getClientUrl(); var req = new XMLHttpRequest() req.open(“POST”, encodeURI(clientUrl + “/api/data/v8.0/accounts”), true); req.setRequestHeader(“Accept”, “application/json”); req.setRequestHeader(“Content-Type”, “application/json; charset=utf-8”); req.setRequestHeader(“OData-MaxVersion”, “4.0”); req.setRequestHeader(“OData-Version”, “4.0”); req.setRequestHeader(“Prefer”, “odata.include-annotations=*”); // Set Account Object var objAccount = {}; objAccount.name = “Rajeev…
-
Continue reading →: JScript to retrieve and execute view (Predefined Query) using Web API – CRM 2016
Assume you would need to retrieve ‘Active Accounts’ from your script, you can either retrieve by building FetchXML from scratch or simply use Web API to execute existing ‘Active Accounts’ view query with no need of writing Fetch XML. Using Web API we can retrieve and execute predefined queries (i.e., System…
-
Continue reading →: ‘Duplicate record execution’ issue with System.Timer Elapsed event – Windows Service
We have a window service with System.Timer control ‘timerExecuteQuery’, which periodically polls the records from Data Base and process. this.timerExecuteQuery= new System.Timers.Timer(3) { AutoReset = true }; this.timerExecuteQuery.Start(); this.timerExecuteQuery.Elapsed += this.TimerExecuteQuery_Elapsed; Everything seems working fine until we noticed few records executing twice causing inconsistency. The issue was random and unable to reproduce…
-
Continue reading →: Build Auto Complete Text Box using Jscript – CRM 2016
In CRM 2016, we got showAutoComplete and hideAutoComplete methods to configure the auto-completion experience in text controls in forms. In this article, I am going to configure “Auto Complete” feature for my “Locality” text box on my Account form. JScript: function suggestLocality() { // List of sample Locality names to suggest accounts…
-
Continue reading →: Task Flow – CRM 2016
“Task Flow” is a new feature available with CRM 2016 online update and is currently on preview mode. Task flows are targeted for phones or tablets. You can configure set of steps, where user perform day to day and package that as a ‘Task Flow’. “Task Flows” are somewhat similar to…
-
Continue reading →: System.Web.HttpUnhandledException – While opening a CRM record
Other day we were getting “Unexpected” exception while opening a ‘Contact’ record. There were no error details to check at application level. When I verified my CRM application server’s Event viewer, there was below error log Exception of type ‘System.Web.HttpUnhandledException’ was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)…
-
Continue reading →: CRM 2016 – Voice of customer’s survey
Capturing customer feedback is crucial in any Service industry to serve Customer better. In Dynamics CRM, Survey feature was the ask from many customers across the world. It has been addressed in the latest release of CRM 2016. “Voice of the Customer survey” is a new feature which is in preview…
-
Continue reading →: CRM 2016 Document Generation – Enable Developer Tab and Add repeated rows in word file
Document Generation is a new feature introduced in CRM 2016. Document Generation simplifies converting your CRM data to either Word or Excel documents. Below are the steps to Download Template Configure Template Upload Template Generate Document. Download the Document Template Navigate to ‘Settings -> Templates’ Choose ‘Document Templates’ Click ‘New’…
-
Continue reading →: “Bad Data” Error – During Web.Config file Decryption
In one of my web application we are reading credentials from Web.config file’s Connection Strings section. And we are encrypting the Connection Strings using aspnet_regiis.exe tool during deployments. Below are the steps to Encrypt/Decryption of Config file using aspnet_regiis.exe tool Encryption Command Open Visual Studio Command Prompt and run below commands.…
-
Continue reading →: Login failed for user SQL Server, Error: 18456 – Troubleshoot steps
In my SQL server I have a Login account ‘sa’ with ‘SQL Server Authentication’. Even though all the properties provided properly, I was unable to login with below login exception. Troubleshooting steps: SQL Server Authentication: Open ‘SQL Server’ properties window Make sure SQL server’s ‘Server Authentication’ set to ‘SQL and Windows…


