web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Different methods to create a batch

(0) ShareShare
ReportReport
Posted on by 1,987

Hi,

What's the difference between creating a batch job by code and add it to a certain menu item AND creating a batch job for the batch job form.

What's the reason for choosing one of those over the other and what are the benefits of each one?

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,669 Super User 2026 Season 1 on at

    Hi IntegrationBeginner,

    Can you clarify your question? I'm not able to understand what exactly you are asking here. Is this related or a duplicate with your other question?

  • .. Profile Picture
    1,987 on at

    Hi Andre,

    This is related to the other question.

    So there are two ways to create a batch.. it's either I create it by code and add a menu item OR I go to system administration -- inquiries--, batch jobs then create a batch job from there

    So my question is: what's the difference between both ways and when I should use each one and what are the advantages/disadvantages of each one

  • nunomaia Profile Picture
    25 Moderator on at

    Result will be the same, since jobs will be executed by batch service.

    Sometimes, I prefer to manually create jobs to group and create dependency between tasks. But it’s a manual process.  

  • .. Profile Picture
    1,987 on at

    Hi Nuno,

    Can you explain please what do you mean by create jobs to group AND create dependency between tasks?

  • nunomaia Profile Picture
    25 Moderator on at

    You can define constraints in tasks. Example: start task 2 after task 1 is executed successfully.

    You normally create manual jobs on this scenarios.    

    pastedimage1660066046591v1.png

  • ergun sahin Profile Picture
    8,826 Moderator on at

    You can also define tasks with code. So there is no difference. The important thing is the form records. It doesn't matter where these records are created (from Form, menu item or x++ code)

  • Community Member Profile Picture
    on at

    Hi IntegrationBeginner,

    There is no difference as such in the execution of the batch job.

    But I would suggest to create a Action menu item for that batch job. By this, if you ever need to run the batch class for a test purpose maybe, you can directly run it using the Menu item instead of using the Class runner form.

    The second point is, if you want to schedule the batch, you can directly set the recurrence from the Menu item as well. The manual process of creating a batch and then adding the task will take more efforts unless you have dependencies between multiple batch tasks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans