Skip to main content

Notifications

Announcements

No record found.

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

Create query method with parameter condition

(0) ShareShare
ReportReport
Posted on by 2
I need to create a query method with parameter condition like the following
 
Select QTY from inventtrans where datefinancial <= @Startdate
  • Martin Dráb Profile Picture
    Martin Dráb 230,569 Most Valuable Professional on at
    Create query method with parameter condition
    There is no startDate variable in getAddedQty(). You have no such a variable declared in the method, no such a variable in the class header and also no such a variable was inherited from a parent class. Therefore the compiler is right when saying that such a variable doesn't exist.
     
    You have it in another class - the contract class. You can access the variable directly from other classes, but it's exactly what parmStartDate() method is for.
     
    By the way, running a separate query for every transaction would be very inefficient. You should try to create a query that calculates for all transactions at once.
  • Create query method with parameter condition
    Dear @Martin
     
    I'm working on a new report on Dynamics AX 2012 R3, I added parameters for the report like the start date.
    Now I created a query in a method and need to add a condition to calculate the QTY before the start date of the report.
     
    the query below that I created I need to refer the condition with the StartDate parameter.
     
    I'm new on development and following some documents to create the report.
     
     
     
     
     
  • Martin Dráb Profile Picture
    Martin Dráb 230,569 Most Valuable Professional on at
    Create query method with parameter condition
    OK, so what do you need from us? Also, please give us some context.
     
    And what's your version of Dynamics AX?

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 Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,569 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans