I have created a batch class which has a query used in it to select membership id and membership type. Idea is that wen i selct these two parameters i shud be able to create the free text invoice for selected member in AR module of AX.My doubt here is wen i select the query fields , how i will be using this input value for further actions? how to use it.
Plz help, i am working on a new module and need some valuable suggestions here.
What’s your version of AX?
If AX 2012, are you using RunBase or SysOperation framework? If RunBase, why?
its AX 2012. I was not sure how to use sysoperation framework so only proceeded with runbase batch.
You really should learn how to use the SysOperation framework - partly because it’s heavily used in standard AX, partially because it will simplify your own development (e.g. you won’t have to implement pack/unpack). Especially if you don’t know how to handle things in RunBase framework either, it would make much better sense to learn how to do it in SysOperation framework than in a deprecated framework.
Back to your question “wen i select the query fields , how i will be using this input value for further actions”. You have to pack and unpack the QueryRun instance (see pack() and unpack() in Tutorial_RunbaseForm class). After the instance is unpacked back to a variable, you can execute the query as usual.