canGoBatch & mustGoBatch - When to use and why?
I was posed this question today by a friend. What is the intention behind the canGoBatch() method on the RunBaseBatch class? His point was since the RunBaseBatch class was solely providing batch capabilities, what is the point of overriding the canGoBatch() and return false to hide the batch tab? I explained that there can be a scenario where you dont want to allow a user to change any settings on the batch tab. In such cases, you can make canGoBatch return false and hide the batch tab. Now he had another question, why do you not want to allow a user to change any settings on the tab? In a real world scenario, this is a typical case where you compulsorily want to ensure that your task runs in a batch. Take for example you are importing transaction files into AX from another legacy system. Now, you would want to post these on a particular date only, say end of every month. For this purpose, the administrator has setup a recurring batch job. Now an unknown user comes in, and posts a pa...