15 Sept 2014

Services Start and stop through code + AX 2012

To Start and stop service in axapta by code You first add reference System.Service Process in Application Object tree (AOT) on reference node.
Write the  following code in job.

System.ServiceProcess.ServiceController ServiceController1 = new
System.ServiceProcess.ServiceController();
;
ServiceController1.set_MachineName(‘.’);
ServiceController1.set_ServiceName("IISADMIN");
ServiceController1.Stop();
sleep(500);
ServiceController1.Start();

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...