AX2012 Custom Lookup on a Dialog

Today I struggled with a custom lookup on a dialog in Microsoft Dynamics AX 2012. To prevent this from happening to me again, and maybe to help you out too, I will share the solution with you here. The following code will utilize a class which extends the AX2012 RunBase class, with a simple dialog and a custom lookup on...