web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,907

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
    299,069 Super User 2025 Season 2 on at
    RE: Different methods to create a batch

    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,907 on at
    RE: Different methods to create a batch

    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
    23 Moderator on at
    RE: Different methods to create a batch

    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,907 on at
    RE: Different methods to create a batch

    Hi Nuno,

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

  • nunomaia Profile Picture
    23 Moderator on at
    RE: Different methods to create a batch

    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,824 Moderator on at
    RE: Different methods to create a batch

    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
    RE: Different methods to create a batch

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,188

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 868 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 593 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans