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

Self-Hosting a WCF Service in a Windows Console App

WCF Services can be self-hosted in a Windows console app. Here we will go through how to do this. First, create a new class library project in Visual Studio: Add a new item: Add a new WCF Service: Add some code to GetData in IService.cs: And Service1.cs: Delete any configuration files that are part of the project. We will use the configuration in our calling app. Compile the code. Now, … Continue reading Self-Hosting a WCF Service in a Windows Console App

Console App Exit Codes

Console apps can return exit codes to provide a way to show the app has successfully run. Here we will go through an example of creating an exe that returns an exit code. First, create a new C# console app: Now, to the main method, we will add: static void Main(string[] args) { Environment.ExitCode = 5; } The Environment.ExitCode will set the exit code value. To get the output, we … Continue reading Console App Exit Codes

Creating a Windows Bat File

A batch file in Windows is a way to automate Windows tasks. Batch files contain the extension .bat. To create a batch file, create a new file in a text editor such as Notepad, enter your commands, and save the file with a .bat extension, e.g. tasks.bat. Batch files are useful in that you don’t have to repeat typing a series of Windows commands such as running executables – they … Continue reading Creating a Windows Bat File

Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on

This error occurs when trying to perform operations on a windows control when using threading. Here we will go through the error and how to resolve it. We will create a Windows Forms app in Visual Studio: First, we will create a working simple solution, without using threads. Add a label and a button: Add the code on the clicking of the button to set the label1 to “Hello World”: … Continue reading Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on

WPF XAML Hello World

Here is a simple example to get started with Windows Presentation Foundation (WPF) and Extensible Markup Language (XAML). First, create a new Visual Studio project and select under Windows templates “WPF Application”: You should see something like this in Visual Studio: You will see a default window. Next, let’s add a button to the window. Open Toolbox and drag a Button across. Then, give the button a name: Double click the … Continue reading WPF XAML Hello World

Dynamics 365 RetrieveMultiple Plugin

In Dynamics 365, we have the ability to register a plugin when a retrieve multiple request is executed on an entity. Here we will go through creating a a Retrieve Multiple plugin. First, create a new class library in Visual Studio: Microsoft.Xrm.Sdk In this example, we will run the RetrieveMultiple when Accounts are displayed. We can invoke this by selecting accounts in a view or running an Advanced Find query. … Continue reading Dynamics 365 RetrieveMultiple Plugin

Creating a Basic Dynamics GP SSRS Report

To create a basic Dynamics GP SSRS report, do the following. First, browse out to your SSRS website and go to the relevant Dynamics GP module. In this example we will display customer information, so “Sales”: Select the Report Builder link to open Report Builder: Select the Table or Matrix Wizard: Click Create a New Dataset: Browse out to your company dataset, in this case TWO: Go to Views and … Continue reading Creating a Basic Dynamics GP SSRS Report