In AX posting form e.g. purchase order confirmation, there's a check box "Late selection". This check box can enable the posting dynamically selecting documents based on the query.
1. Go to "Procurement and sourcing -> Periodic -> Purchase order -> Confirm purchase orders"
2. Check "Late selection".
3. Click "Select" to edit the query of purchase orders.
4. Click "Batch" to set up the batch job.
5. Click "OK" to create the batch job.
User will see the purchase orders found by that query got confirmed automatically and periodically.
One more thing, which I assume it's a bug at least in AX 2012 feature pack version 6.0.1108.6482. That user can open this posting form from a specific purchcase order, and do the exact same steps above, however the batch job creaed by that way will not post any purchase orders except the specific one which is opened from. In other words, the query user edits doesn't work at all. But the weird thing is that if "Late selection" is not checked, the query works.