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)

batch Jobs

(0) ShareShare
ReportReport
Posted on by 242

I’d like to create an invoice batch that will invoice our warranty return orders each day. I thought I did it by doing the following and it works for that instance but does not recur. I think the issue is that the recurrence tries to use the date the first batch was run rather than today’s date and it can’t use the date of the first batch because it is often before the return order was created.  Can you advise on how I can accomplish this? so it looks like its invoicing the sales order before return order has been created? 

The batch keeps running and log says complete but there are still open orders that qualify. 

*This post is locked for comments

I have the same question (0)
  • Arun Keerthy Profile Picture
    360 on at

    During run date assigned from the unpack(), remove the date variable from the currentList and set the date value to today's date during execution.

  • allaboutax Profile Picture
    242 on at

    Can you please provide a screenshot of what you mean? where do I remove the date?

  • Arun Keerthy Profile Picture
    360 on at

    Check the classDeclaration method and #localmacro.CurrentList used in the batch class.

  • allaboutax Profile Picture
    242 on at

    ok I am not technical does this need to be done everyday or just something needed to change in the class and then it will run per day and invoice both the sales order and return order associated?

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    why don't you add a range using standard dialog, before you add the job to batch, where you can set range. have you tried that with (day(0))

  • Arun Keerthy Profile Picture
    360 on at

    Ohh, then someone from technical need to help you. Can you find a flag named 'As of today'  in the dialog form that sets the batch?

  • allaboutax Profile Picture
    242 on at

    They want to use a batch job for this? how do I do this?

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Yes, click the "Select" button and then add your range; that should be considered each time batch job executes.

    you may want to test this on TEST server, where before each test you can close and reopen AX and then change session date to experience the testing of your batch job.

  • allaboutax Profile Picture
    242 on at

    where is dialog form?

  • allaboutax Profile Picture
    242 on at

    can you provide screenshot of where I should add range?

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