最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Helpful tip: Strategy on how to debug an AX form/report when you’re at your last straw…

网络文摘 William 1668浏览 0评论
Here is a helpful tip for debugging an AX form or report (and sometimes other objects):

Sometimes when I'm at my wits end with a form or report that I can't seem to debug, I have a little strategy that allows me to quickly 'sledgehammer' out the problematic area. It also is helpful if people are testing a certain form or report and I want to debug at the same time without interfering with their operations.

I duplicate the object (Figure 1 below) and do my testing on the 'CopyOf[OBJECTNAME]' object that is created. Sometimes doing this allows me to make major changes like just deleting a datasource(s) outright if I feel it can help me get to the root cause.

For example, there was a situation where there was a very highly complex form with 25 datasources and complex joins and one of the grids wasn't showing data someone was expecting. We felt it was a query issue so I was looking around in the code a bit but nothing jumped out at me. I had a hunch a something was wrong with one of the datasources whether it was a join, missing data, wrong relationships, etc. From there, you can usually hack away at that sucker until you find an indicator that a change worked. This allows you to delete that copyof object, recopy the original and then go in and more strategically look in that area for what is wrong.

In the even you get close again, you can make a copy of the CopyOf object and keep the cycle going :-) Just delete all your objects when you are done!!!!!

It won't always work but it will a majority of the time and is a good way to jar you from being stuck on something.

Hope that helps!!!!



Figure 1 - Duplicate the AOT object

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址