Hi Guys,
Is it possible to configure Alert Rule for Batch Job through X++?
If yes, will be very grateful for examples of code or articles links

Hi Guys,
Is it possible to configure Alert Rule for Batch Job through X++?
If yes, will be very grateful for examples of code or articles links
Hi Polinak,
You can try something like this -
BatchJob batchJob;
Map alertsData = BatchJobAlerts::addAlertsToMap(
curuserid(),
NoYes::No, // Value for Ended batch job
NoYes::No, // Value for Error batch job
NoYes::No, // Value for Canceled batch job
NoYes::No, // Set value if you want to alert using pop-ups
NoYes::No, // Set value if you want to alert using e-mail
null);
BatchJobAlerts::saveAlerts(batchJob.RecId, alertsData);