Posts

Showing posts from January, 2018

Customizing D365 with event handlers

With Dynamics 365 release we have to do most of the things using extensions and event handlers. You still have an option to over layer code. While creating new package if you choose select existing packages and modified any standard object which belongs to that package, you are doing overlaying.  In previous versions it was not a big  issue but with new release we should stop doing that and instead embrace a practice of doing customizations using extensions and event handlers. Source code and metadata of model elements can be extended without an over-layering using extensions. Today I will share some code snippets about how to  do few things while using event handlers How to get Form Datasource If you copy form event handler here is how you can get form datasource from XFormRun [FormEventHandler(formStr(HcmPosition), FormEventType::Initialized)] public static void HcmPosition_OnInitialized(xFormRun sender, FormEventArgs e) { FormDataSource hcmositio