Dynamics 365 – Xrm.Page.data.refresh and Xrm.Page.data.save

Dynamics 365 has a couple of JavaScript functions that are useful in refreshing and saving pages – xrm.page.data.refresh and xrm.page.data.save. We will go though examples of using these. The refresh function is defined as: Xrm.Page.data.refresh(save).then(successCallback, errorCallback); We can pass an optional save boolean as well. For the purpose of the demo, let’s say when tabbing off the Account’s website field, we want to refresh the current page. Our code: function RunJavaScript() … Continue reading Dynamics 365 – Xrm.Page.data.refresh and Xrm.Page.data.save

Powershell Cmdlets for Dynamics CRM On-Premise

To use the cmdlets for Dynamics CRM On-Premise, do the following. Go to the server running the Full Server role for Dynamics CRM. Type in: Add-PSSnapin Microsoft.Crm.PowerShell You can now run CRM commands. Type in: Get-Help *Crm* CRM will return help information on its commands: You can then run individual commands, for example, it you want to see CRM settings, you can run a command to get a particular setting. … Continue reading Powershell Cmdlets for Dynamics CRM On-Premise

Getting and Setting a Dynamics CRM Field in JavaScript

To get and set a Dynamics 365 field, first find out the field name. Open the form and find the field, for example on the leads form, the topic: Double click the field and see what the Name is, in this case “subject”:   function UpdateField() { var s = Xrm.Page.getAttribute(“subject”).getValue(); alert(s); Xrm.Page.getAttribute(“subject”).setValue(“Hello World”); var s = Xrm.Page.getAttribute(“subject”).getValue(); alert(s); } When this runs we see first the original topic: Then … Continue reading Getting and Setting a Dynamics CRM Field in JavaScript

Dynamics 365 Business Rules

Business Rules are a way in Dynamics 365 to add actions to events that occur in the user interface. Let’s go through an example with the Leads form. Select Business Rules from the navigation bar and then New Business Rule: This will open a blank template. Let’s add a condition that if the City = “New York”, then lock the description field. Click Activate: As soon as the City is set, the … Continue reading Dynamics 365 Business Rules

Dynamics 365 Troubleshooting User Access

There are times when users will not have access to resources in Dynamics 365 when they should. Dynamics 365 will throw an error based on the type of denied access. Generally, these access errors can be resolved by determining what the resource is the user is trying to access and then granting the user access to the resource through an security role. For example, if a user wants to assign a security role … Continue reading Dynamics 365 Troubleshooting User Access

Dynamics CRM Read Only Form and Disable Fields with JavaScript

One way to lock down a form is through JavaScript. Let’s go through how to do this by locking down the Leads form. Create a new solution and add the Leads form: Select Form Properties and Add from the Form Library. We will be adding a new JavaScript library: Select New: Enter information below: Click Text Editor and enter the JavaScript: function ReadOnly () { var cs = Xrm.Page.ui.controls.get(); for (var … Continue reading Dynamics CRM Read Only Form and Disable Fields with JavaScript

Dynamics CRM Filtered Views

Dynamics CRM provides filtered views so we can access CRM data in SQL. To access filtered views, go to the Dynamics CRM company database and go to Views. You will see views starting with the name “Filtered”: Selecting from the filtered view returns the results, e.g. Custom entities also have filtered views: The views have standard fields as well as new fields: Option set fields appear in filtered views as two SQL … Continue reading Dynamics CRM Filtered Views

Dynamics CRM Create Option Sets

Option Sets are used in Dynamics CRM to allow a user to select a value from multiple selection options. We will go through an example where we will add a field, Favorite Color, to Accounts. First, create a new solution in Dynamics CRM. Add the accounts entity to the solution. Then, go to fields and select new field. Give the field a display name and set the data type to Option Set: You can … Continue reading Dynamics CRM Create Option Sets

Microsoft’s Power Couple: Power BI and Microsoft Dynamics

Power BI, Microsoft’s cloud based business intelligence service, is a must-have component for companies running any of the products in the Microsoft Dynamics suite, whether it is CRM, AX, GP, NAV or Project Madeira. As a modern intelligence tool, it enables companies to rapidly get insight into their data and interactively find trends to make informed business decisions. Without BI, companies lack visibility and may be running with the wrong roadmap. Businesses already have basic reporting into their data, such as what last month’s sales were, who … Continue reading Microsoft’s Power Couple: Power BI and Microsoft Dynamics

Dynamics CRM Unified Service Desk Setup

Once USD has been installed (see my earlier post) the next step is to configure it. In Dynamics CRM, you can access the USD setup in Settings->Unified Service Desk: Clicking on Hosted Controls, you can see a list of the out of the box hosted controls: Let’s create a new hosted control. The control will show the start page of Dynamics CRM. Click “New” to create a new hosted control. Give … Continue reading Dynamics CRM Unified Service Desk Setup