Introduction to TypeScript

TypeScript is a superset of JavaScript developed by Microsoft that supports classes, modules and interfaces, along with several other features. It is a static type language, meaning it will validate code at development time. JavaScipt is a dynamic language, which does not validate code at development time. Having a static type language is very useful for building robust code. To try out TypeScript online, go to www.typescriptlang.org and select Playground: You will … Continue reading Introduction to TypeScript

JavaScript setTimeout and setInterval

In JavaScript, we can use setTimeout() to call a function after waiting for a specified number of milliseconds. We can provide a callback function to as well as the timeout as parameters. For example, let’s say we want to print to the console “Hello World” after waiting 2 seconds. To do this: setTimeout(function(){ console.log(“Hello World”); }, 2000); This will wait for 2 seconds before printing to the console: If we … Continue reading JavaScript setTimeout and setInterval

Dependency Inversion Principle

Dependency Inversion Principle (DIP) is a software development principle that reduces coupling between code. Robert C Martin explains DIP: High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions. Consider if you have an object that calls another object. The higher level object is dependent on the lower level object; making changes to the lower level object … Continue reading Dependency Inversion Principle

Don’t Repeat Yourself

Don’t Repeat Yourself (DRY) is a software development principle that prevents waste through the repetition of code. When code is designed and developed, it should be abstract. As a result of abstraction, the code is easier to maintain and extend. Smarter code leads to less code waste, which leads to better software. Imagine if you find a bug in one part of your code, and the bug is repeated in … Continue reading Don’t Repeat Yourself

Separation of Concerns

Separations of Concerns (Soc) is a design principle in software development. The idea is to separate code based on the function and logic. A typical example is the separation of code that performs business logic, and the code that displays this to the user. This code should exist independently; if a developer were to write code that performed both these functions together, it would be a violation of the principle. … Continue reading Separation of Concerns

C# Using the BackgroundWorker

The background worker in the .NET Framework is used to run background operations in a background thread. This is useful if you don’t want to tie up your user interface while an operation completes, such as downloading a large file. The background worker exposes events ProgressChanged and RunWorkerCompleted, which are useful to display progress to the user in a UI scenario. In this example, we will create a WPF form … Continue reading C# Using the BackgroundWorker

Update Entity Framework Model

When using Entity Framework, you may need to update the model, if for example you want to add or remove objects such as fields, or you want to refresh the current model. To do this, select the edmx file, and then right click on the designer and select Update Model from Database: From here you will be able to add/remove objects:  

Dynamics CRM Option Sets and Power BI

When using Power BI to connect to Dynamics CRM. there is a problem in that option set values are retrieved as their number values, not their actual text label value. The CRM OData feed returns this value, so it is up to the developer to get the actual text value. Doing so isn’t so easy, as we can’t simply look it up. There are different ways to get around this issue, including doing a … Continue reading Dynamics CRM Option Sets and Power BI

Dynamics GP Dictionaries List

Below is a list of native and 3rd party applications and their associated dictionaries. Name Id Main Dictionary Forms Dictionary Reports Dictionary Publisher Dynamics 0 DYNAMICS.DIC FORMS.DIC REPORTS.DIC Microsoft Advanced Go Tos 4612 ADVGOTO.DIC F4612.DIC R4612.DIC Microsoft Advanced Security 3104 ADVSECUR.DIC ADVS_FRM.DIC ADVS_RPT.DIC Microsoft Control Account Management 2416 CAM2416.DIC CAMFORM.DIC CAMRPTS.DIC Microsoft Cash Flow Management 1632 CFM.DIC CFMFORM.DIC CFMRPTS.DIC Microsoft Collections Management 1157 CPro.dic F1157.DIC R1157.DIC Microsoft CopierSeries 2992 QK2992.DIC … Continue reading Dynamics GP Dictionaries List

Connecting to CRM Online using the Dynamics CRM 2016 SDK

The Dynamics CRM SDK for 2016 comes with many samples to get you up and running. One of the samples is the QuickStart projects. These projects are applications that will connect to Dynamics CRM and perform certain operations in Visual Studio projects. To run these samples, after installing the SDK, go to the folder SDK\SampleCode\CS\QuickStart. Note – I am running the C# sample. To run the QuickStart using WinForms, first open the app.config file: Uncomment … Continue reading Connecting to CRM Online using the Dynamics CRM 2016 SDK