August 05, 2022
Create Code extension in D365FO
In case you missed this, Microsoft recently added one more option in Visual Studio to create an extension 'class' of any object (not as an object extension but an extension class to add code/new method).
Navigate to 'Application explorer' (aka AOT) and find your object, right click on this and you will find an option to 'Create code extension', if you select this, it will create a class with all syntax you need to create an extension of that object (i.e. final keyword, add 'ExtensionOf' at the top).
This action will create a class with the name 'ObjectName_Model_Extention' in your project with the below syntax,
This is super quick to create an extension call for any applicable object. (Yeah you can not create an extension on an EDT using this option ;) )
Cheers!!! Happy Weekend.
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta