But, in reality, I still now and then meet people who have worked with AX for quite some time, but don't know this very basic concept.
Therefore, I just want to briefly describe it here to refresh everyone's memory
Apart from allowing to run the class from AOT, this will allow to assign it to a menu item (according to Best Practices, it should be a menu item of type Action), and run the class using this menu item.
Below is the correct syntax of the main method:
public static void main(Args _args)
{
//Your code here
}
Please also note, that there is an editor script that contains the template for the main method. You can invoke it from Scripts->template->method->main
Good information Vanya
ReplyDelete