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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

[AX 2012] X++ Batch Job Classes?

(0) ShareShare
ReportReport
Posted on by 970

Hey,

I appreciate the help in my other '[AX 2012]' thread.

OK so I understand that "Batch Jobs" extend "RunBaseBatch" but how do I know what class to use? In the examples I've found on google, people tend to use examples with custom classes like "TestClassXYZ," which doesn't really help me since I don't want to create a batch job in x++ (or at all for that matter).

Is every batch job its own class? Are the names of these classes at all deterministic (like, BatchJob<BatchJobId> or "BatchJob305932145")? What class(es) is(/are) the batch jobs I see in Inqueries > Batch jobs > "Batch Jobs" / "Batch Job History" ?

I don't want to extend RunBaseBatch to make my own -custom- batch job, I just want to run existing batch jobs.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    bombtrk Profile Picture
    475 on at

    Click a job in 'Batch Job', then click 'View Tasks', and you'll be able to see the class name that is used.

  • bdzevel Profile Picture
    970 on at

    I guess there's no way to run a whole batch?

    Either way, that's pretty cool. You're the man.

    EDIT: Any way to enumerate those classnames externally? Maybe read them from a table or something...?

  • bombtrk Profile Picture
    475 on at

    What do you mean "run a whole batch"?

  • bdzevel Profile Picture
    970 on at

    Maybe I have a batch job set up in Inqueries > Batch Jobs > Batch Jobs that I want to run.

  • bombtrk Profile Picture
    475 on at

    You can start by looking at the Batch table, BatchJob table, and other "Batch" tables.

    You'll have to get the class number from somewhere else.

  • bdzevel Profile Picture
    970 on at

    Riiiight well this brings us back to my original question: How do I know the class for the batch jobs?

    EDIT: I actually don't need the "classnum" as I can look up these batch jobs by the ID, but I need the class nonetheless to instantiate and call doBatch() on.

  • bombtrk Profile Picture
    475 on at

    look at the Batch class... There's a className method. Look for className2Id or something in there... That would work for you.

  • bdzevel Profile Picture
    970 on at

    I'll look into it, thank you very, very, very, very much.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans