blog002

Hey guys, Today I will be giving you a little bit info on how I am upgrading AX 2012 code to Dynamics 365 for Finance and Operations.

We know that development in D365  is quite different from AX 2012.

In AX 2012 I have a table called PRLParameters, with custom fields. This table is no longer used in D365, its called PayrollParameters. So how do I add my custom fields to it? Extensions!

Right click on the table in the application explorer and select “Create Extension”, this adds an extension of the table to the project.

blog002

You can add a new field by right clicking on the extension and selecting Open.

blog003

Right click on the fields node –> New –> Enum to add a new field to the extension.

blog004

Open the properties of the field to change its name.

blog005

Similarly I needed to add the field to the Field Groups. This time right click on the Field Groups node and click New Group.

blog006

Give the group a name and add the field you just added

blog007

I also need to add custom methods to standard class. I can use extensions in that too but this time I won’t be creating extension from the application explorer. What I do is I directly add a class in my project.

Right click on the project –> add –> new item –> class. Make sure the name of the class ends with _Extension.

blog008

How will AX know this is an extension of some class? Just add an annotation on the class: [ExtensionOf(classStr(“Class Name”))]. Now we can add our custom methods in here.

blog009

That’s it for this part guys. Hope this will be useful. I will be back with some new stuff as I keep exploring D365.

 

Leave a Reply

Recent Comments

    Archives

    Categories