I creating the SysOperation* classes (Business Operation Framework) as Controller, DataContract, Service and UIBuilder. I have problem with design because Ax2012 didn’t show all query ranges.
I have query with 5 datasources and 14 ranges. When I run controller class AX2012 shows only first 4 datasources and first 9 ranges:
To see all datasources and all ranges I must choose „Select” and „OK”:
And then I see all datasources and all ranges:
What can I do to see all datsources and all ranges at class start ? Is it possible ?
I think that I must add some code to UIBuilder to show all ranges...
I know that I can overwrite class SRSReportRunBuilder and change define MAXRANGES but I don't want to change system class ! I want to write something in my UIBuilder.
It should be possible, but think twice whether it's useful. You'll end up with a huge dialog and users with low resolution will hate you.
Nevertheless if you want to do it anyway, simply debug the UI builder to find the limit and change it. For example, I know that SrsReportRunBuilder uses a macro called #MAXRANGES for this purpose.
Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog
Sure, you can write your own UI builder if you want. But it sounds like reinventing the wheel to me.
When I run controller class – I see only 8 ranges (because MAXRANGES=8 in SrsReportRunBuilder)
When I run controller class, click „Select”, click „OK” – I see all ranges !
I want to preserve limit with 8 ranges but in few SysOperation classes I want to have all ranges. This is why I can’t change SrsReportRunBuilder class for all processes. But I don’t know how to change UIBuilder in my SysOperation* to show all ranges when controller starts. Any help ?
I think you're wrong when saying that you can't change SrsReportRunBuilder. You can and you should, because you're own requirement is to change its behavior. You want it not to apply the limit in all cases, i.e. you want to change this non-conditional logic to conditional.
The question is how the builder will know which behavior to use. The natural choice is asking the controller, which you have conveniently accessible through the controller variable. You could extend SysOperationController itself, let your controllers implement an interface and look for it in SrsReportRunBuilder or something like that.
Implementing the requested behavior will be trivial then - you need a single if statement to ignore the limit.
I can't change any system class. This few SysOperation* classes is a part of big application and we didn't change any system classes. Of course change in SrsReportRunBuilder is very easy but I can't change it !!! I looking for another possibility. Your sollution is good but not for me.
I think that I must add somethink to UIBuilder like click "Select" + click "OK". Could anybody help me with that ?