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.
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.