Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Batch job does not run without running batch processing in organization administration

(0) ShareShare
ReportReport
Posted on by 74

Hi All,

 

we developed a class that uses the sysexcelapplication that uses a custom batch job to import excel to AX through the batchjob,,however the batch job does not run except we run the bathprocessing in he organization administration, but I have keep the batch processing running all time and keeps the session in order to keep the batchjob running.

my question is how I can use the sys excel application in e batch job where it runs like any other job .

 

below is a screen shot of the batch processing  that needs to be kept running in order to keep the batch job running.

pastedimage1573482312185v1.png

 

 

 

Thank you,

  • MDeeb Profile Picture
    MDeeb 74 on at
    RE: Batch job does not run without running batch processing in organization administration

    Thanks a lot Martin, the team has used the EPPLUS library and it is working perfect.

    Thank you.

  • Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RE: Batch job does not run without running batch processing in organization administration

    Before you start implementing the whole thing by yourself with a .NET library unfamiliar to you (which is expensive and not without risks), are you sure that your requirement can't be achieved by the standard feature that exists in AX for exactly this purpose?

    What's the problem that you can't resolve with DIXF? Maybe we can help you to solve it, so you won't have to design, implement, test and maintain a custom solution.

  • MDeeb Profile Picture
    MDeeb 74 on at
    RE: Batch job does not run without running batch processing in organization administration

    Thank you Martin, may you please share code sample (if you have one ) using EPPLUS Library for excel import ?

    Thank you,

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RE: Batch job does not run without running batch processing in organization administration

    Yes, as I said, it's possible to use can either data management (DIXF) or another library for working with Excel files, such as EPPlus.

    Regarding DIXF, look at Automated Data Entity Import Using DIXF in Dynamics AX, for instance.

  • MDeeb Profile Picture
    MDeeb 74 on at
    RE: Batch job does not run without running batch processing in organization administration

    Thank you Nikolaos, yes i will share the code tomorrow after i connect , as currently i dont have access.

    Thanks a lot.

  • MDeeb Profile Picture
    MDeeb 74 on at
    RE: Batch job does not run without running batch processing in organization administration

    Thank you Martin,

    the file type is in excel format as per the client requirements , is there any way we can write a code for this  batch without having to open a client session and run the batch processing from organization administration ?

    and can we use data management to import the file through batch job with recurrence ?

    Thank you,

  • Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RE: Batch job does not run without running batch processing in organization administration

    No, I can't use SysExcelApplication in a server batch, because this class can only run on client.

    Can't you use data management to import the file? It's be the best approach, if it's possible in your case.

    If you have to write use your own batch, consider using a different library (e.g. EPPlus) or avoiding Excel completely (e.g. using XML or CSV instead).

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Batch job does not run without running batch processing in organization administration

    Then perhaps the issue is in your custom class. Would you mind sharing the source code of that batch class?

  • MDeeb Profile Picture
    MDeeb 74 on at
    RE: Batch job does not run without running batch processing in organization administration

    Thank you Nikolaos for your response, all bath configurations are setup, all batches are working fine except for this custom one, i forgot to mention that i had to change in the batch tasks to run in client mode except server mode other wise it doesn't work.

    so i have to set it to client mode then run the batch processing in the organization administration in order to make it run.

    Thank you,

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Batch job does not run without running batch processing in organization administration

    Is this the only batch job that doesn't work as expected?

    Please check your batch server setup in System administration - Setup - System - Server configuration.

    1) Do you have at least one AOS where "Is batch server" is checked?

    2) In Batch server schedule, do you have some value in Maximum batch threads, and do you have some time window specified? Time window should be 00:00:00 - 23:59:59 if you want to have batches enabled for this server around the clock

    Then check System administration -Setup - Batch group and verify that all batch groups are associated to at least one batch server.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans