How to use PowerShell cmdlets for Dynamics CRM

In the Dynamics CRM SDK, there is the capability to use PowerShell to connect to CRM. To do this, in the SDK\Bin folder, there is a file called RegisterXRMTooling.ps1: Open PowerShell as an Administrator and from the file directory, run .\RegisterXRMTooling.ps1 Once complete, you should see something like below: Next run: Add-PSSnapin Microsoft.Xrm.Tooling.Connector Type: Get-Help “CRM” to see it working:  

Query Dynamics CRM Through JavaScript

Using JavaScript, we can send queries to Dynamics CRM to retrieve data. We will go through an example of how to do this. We will use Xrm.Page.context.getClientUrl() to get the CRM URL. If we run code to get the URL we get:  var url = Xrm.Page.context.getClientUrl(); alert(“URL: ” + url); We will use this URL to get the full web service URL: var url = Xrm.Page.context.getClientUrl() + “/XRMServices/2011/OrganizationData.svc/”; Next, we will use the Id of … Continue reading Query Dynamics CRM Through JavaScript

Dynamics 365 JavaScript Get User

To get the Dynamics 365 user name and user id in JavaScript, create a function and attach and publish:  function GetUser() {   var UserId = Xrm.Page.context.getUserId(); var UserName = Xrm.Page.context.getUserName(); alert(UserId + ” ” + UserName); }  

SSRS Subreports

There are instances when you will need to use a subreport in SSRS.  Here I will build a report with a subreport, using Report Builder to demonstrate. The example is there is a table holding sales header data and a table holding sales line data. We will use the header on the report, and the lines on the subreport. To build the report, do the following. First, open Report Builder and create a … Continue reading SSRS Subreports

Clear IE and Edge Cache using Developer Tools

In Internet Explorer and Edge browser, you may need to clear your cache. Through the User Interface, you may do this the following way. Chrome IE To do also do this using the browser’s developer tools. To do this, open your browser and press F12. This will bring up developer tools. Then, click on the Network tab. Chrome IE Here, you will see different buttons, including: Always refresh from server … Continue reading Clear IE and Edge Cache using Developer Tools

Installing Visual Studio Web Essentials

Visual Studio Web Essentials is a VS extension by Mads Kristensen that assists with the development of CSS, HTML, JavaScript, TypeScript and CoffeeScript. To install Visual Studio Web Essentials, go to http://vswebessentials.com/ and select Download. We will install on Visual Studio 2015: Select the version to install:   This will download a VSIX file. Open it: Click to install: You will see: Once installed, open Visual Studio: Go to Tools->Options: Select Web Essentials. … Continue reading Installing Visual Studio Web Essentials

Dynamics 365 Access Xrm from HTML Page

In a Dynamics 365 web resource such as an HTML page, you may need to access Xrm properties, such as Xrm.Page.context.getClientUrl(). Adding this to the page may throw an error (or actually display no error) if the HTML page cannot access the resource. To get this to work, add window.parent.opener like below: window.parent.opener.Xrm.Page.context.getClientUrl()

Dynamics 365 SOAP Logger

The SOAP Logger is a tool that is located in the CRM SDK at: SDK\SampleCode\CS\Client\SOAPLogger You will see the files: Open the solution in Visual Studio. Update any references. Open the SOAPLogger.cs file. You will see: Find the run procedure: This procedure will run a command and then write to an output.txt file the SOAP request and response. Add some code, for example all accounts that contain “a”: var query = new QueryExpression(“account”); query.Criteria.AddCondition(“name”, ConditionOperator.Equal, “Microsoft”); slos.RetrieveMultiple(query); Build … Continue reading Dynamics 365 SOAP Logger

WCF Service Tcp Binding Example

In this post we will take a look at using tcp bindings in a WCF service. We will follow on from a previous post example. In our previous example, we have a WCF host that is using basicHttpBindings: Clicking Edit, we can see the different bindings available: Let’s add a new TCP binding to our app. Select New Service Endpoint: Select netTcpBinding: Add the address and contract: Save the config. … Continue reading WCF Service Tcp Binding Example

Dynamics GP SmartLists and SmartList Builder

SmartLists in Dynamics GP are a way to view data through the Dynamics GP user interface. To view the list of SmartLists, go to Microsoft Dynamics GP and select SmartList: You can also access SmartLists through the lightbulb icon in the Standard GP menu: Expand the pane to select a SmartList: Click on Search to select the maximum number of records returned. Click on a field to filter the selection: … Continue reading Dynamics GP SmartLists and SmartList Builder