Custom class in Epicor Functions

Hi,

I would like to now if it’s possible to create custom classes in Epicor Functions then call it from anywhere inside the same library?

Regards
Alain

Custom class no, but you could create the class as a DLL and put it in the assemblies folder then pull it into any library you want. Latest version of kinetic does support functions calling other functions in the same library prior versions do not.

1 Like

Alternatively, if you are looking to call a related function inside of a function, you can create a new function library and purpose it as the “internal” library for the other function library.

Thank’s Aaron for Your Quick Reply :blush:

My point is having a class which contain multiple members, functions, etc. So this way I can be instantiated my class and store values and call his functions.

Regards,

Alain

A library in EFX is the class. If you want object/properties or custom datasets you may have to explore an external DLL for that.

2 Likes

From a programming practice, it’s better to use services than to new up objects everywhere. If the class changes, then the programmer has to go and find all the places where that class is instantiated and update the code. With a service, you program against the interface which is less brittle in the face of changes. An Epicor Function is as close as we can get to dependency injection/inversion of control practices.

4 Likes

I understand that sometimes one needs to create classes to serialize and deserialize objects

1 Like