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, ...
Suggested Answer

Dynamic parameters on Inventory Value Report when run in a batch job

(1) ShareShare
ReportReport
Posted on by 21
I am trying to run the inventory value report as a batch job that runs every Wednesday. When it runs, I want the 'From date' and 'To date' to populate as the previous Sunday-Saturday week. For example, if it ran on 2/7/2024, I want it to run the report with data from 1/28-2/3. 
There is this 'Date interval code' in the parameters on the batch task that allows you to select a code for 'Previous week'. In the example mentioned earlier, the issue I am experiencing is that the batch job runs on 2/14, and still runs the dates 1/28-2/3.
 
How do I get this to run correctly, such that every Wednesday when the batch job runs the report, it runs for the previous week, and not a static set of dates?
I have the same question (0)
  • Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    I'm not familiar with this report, but as I'm looking at code, your approach should work (as long as the date interval is configured correctly).
     
    Do you see expected dates if you open the date interval (General ledger >Ledger setup > Date intervals)?
     
    Just for future reference (if debugging is needed), the initialization of dates is done InventValueReportInit.adjustFromAndToDateToDateInterval().
  • Suggested answer
    saurabh bharti Profile Picture
    15,055 Moderator on at
    Hi,
     
    I think it should work with interval code what you have defined , it should pick the dates based on run date .
     
    Did you try with Inventory value report storage option in cost management ?
  • PG-16052038-0 Profile Picture
    21 on at
    Hi Martin,
     
    This is my date interval setup, though nothing looks out of place to me.
     
  • Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    It indeed looks good to me.
     
    To be sure: how do you determine for which dates it ran?
     
    I suspect it'll need debugging to understand what's going on, if you can do it or you have someone who can.
  • PG-16052038-0 Profile Picture
    21 on at
    When the batch job runs, it sends the report to my email, and I can see the from date and to date at the top of the report. Every time it has run it has displayed the same date range rather than updating each week.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans