Notes on code and the things I build.
Aug 5, 2019
The extension method in C#, VB, or F# is a static method that accepts this modifier of TInput. The method can be either void or return value. From the MSDN definition, Extension methods enable you to "add" methods to existing types without creating a new derived type,...
Jul 18, 2019
Dependency Injection is a pattern that has already been proven to ease of our development. I remember a quote that you sure already heard: "Program to an interface, not an implementation". Why is it important to rely on the interface instead of the implementation class? The...
May 17, 2019
Let's say you have Entity Master and Entity Child. Then you want to have a scenario like from the master you want to have two subgrids. If you click the button add on subgrid 1, you want to fill in Child.Master1 and then click the button add on subgrid 2, you want to fill in...
Mar 18, 2019
The common routine that we will do in custom RibbonButton is adding the library that we want to use. Let's say we have a function onCallButton on JavaScript A. But inside the function onCallButton, we have called another JavaScript B. Hence we need to register JavaScript B to be...
Mar 6, 2019
JavaScript sometimes makes me stressed as a developer because of its dynamic nature. You can assign whatever value on the JavaScript object, change it into another type and it will not throw an error. Therefore TypeScript will help you so much because of its strictness. In this...
Dec 11, 2018
In my company where I work, we have a custom program that will process big load data. Per running, it can process around 50.000 records. The average finished can be more than 3 hours ++. After I check, one of the things that make this slowness is because of the retrieving...
Nov 29, 2018
One of the basic tasks that usually I do is getting data from the database, changing it into another object, and then processing it.For instance, if you have this data: var details = new[] { new Person {TypeId = 1, Name = "Dafid", Amount = 1000m}, new Person {TypeId = 1, Name =...
Oct 15, 2018
On our customization, it is very common if we disable some of the attributes. But when a specific attribute changes, we want to set automatically the value of the disabled attribute and save that value in our database. The problem is CRM will skip all the disabled attributes and...
Sep 21, 2018
I read one of the blog posts in dev.to about this Cyclomatic Complexity and I couldn't resist also not talking about this one. Because I see a lot of programmers making this mistake without knowing it. So just today I checked my email and saw there is an automatic email...
Sep 12, 2018
I had one requirement to send an email daily for every case that was created and still in the stage of investigation/re-investigation state. Before this customization is used in workflow but somehow the performance is not too good and I change it into the plugin. Create Email...