简体   繁体   English

维度查找挂起 AX 客户端?

[英]Dimension lookup hangs AX client?

I have an import interface (not coded by me) that imports XML data and creates LedgerJournalTable (1) and LedgerJournalTrans (1..n) records.我有一个导入接口(不是我编码的),它导入 XML 数据并创建 LedgerJournalTable (1) 和 LedgerJournalTrans (1..n) 记录。

When handling LJT dimensions, the code first checks that the dimension exists in AX, then inserts the data in the dimension[x] field.在处理 LJT 维度时,代码首先检查维度是否存在于 AX 中,然后将数据插入到维度 [x] 字段中。 However, in the case that the dimension doesn't exist, a warning is shown to the user after the import run ends, but the data is still inserted as is .但是,在维度不存在的情况下,导入运行结束后会向用户显示警告,但数据仍按原样插入。

And when the user goes to the LJT line after the import is complete, the erronous value is shown in the dimension field.并且当用户在导入完成后进入LJT线路时,错误的值会显示在维度字段中。 When the lookup/drop-down of this dimension is clicked, the lookup does not open and AX client hangs.单击此维度的查找/下拉列表时,查找不打开并且 AX 客户端挂起。 Ctrl+break will recover it, but the lookup never opens. Ctrl+break 将恢复它,但查找永远不会打开。 You can delete the value, save, and the problem will still persist.您可以删除该值,保存,问题仍然存在。 You can manually enter an existing value and save, and the problem will still persist.您可以手动输入现有值并保存,问题仍然存在。 Problem extends to the table browser also.问题也延伸到表格浏览器。

Any idea why this is happening and how can it be fixed, other than not saving the erronous value in the first place (I have no idea why this is done this way in the first place)?知道为什么会发生这种情况以及如何解决它,除了首先不保存错误值(我不知道为什么首先要这样做)?

Thanks in advance.提前致谢。

Let me know if I'm reading this correctly.让我知道我是否正确阅读。

  1. User runs some process to import LJ table/trans records from XML.用户运行一些过程从 XML 导入 LJ 表/trans 记录。
  2. If a bad dimension is inside XML, it shoves the data into the LJ trans dimension[x] field even though it's invalid, and presents a warning to user.如果 XML 中存在错误维度,即使数据无效,它也会将数据推送到 LJ trans dimension[x] 字段中,并向用户显示警告。
  3. User views the journal and sees the bad data and attempts to use the lookup to correct it, but the lookup hangs/crashes.用户查看日志并看到错误数据并尝试使用查找来纠正它,但查找挂起/崩溃。

Seems to me the issue may be that you've been shoving a bunch of bad data into AX and the lookup is trying to use table/edt relations that are invalid.在我看来,问题可能是您一直在将一堆坏数据推入 AX,并且查找正在尝试使用无效的表/edt 关系。

If I'm right, you need to go to SQL directly and query the ledger trans table and look for any bad dimension data and correct/remove it.如果我是对的,您需要直接将 go 到 SQL 并查询分类帐转表并查找任何错误的维度数据并更正/删除它。

I suspect existing bad data is causing the lookup to fail and not merely whatever bad data you imported and are looking at.我怀疑现有的不良数据会导致查找失败,而不仅仅是您导入和查看的任何不良数据。

Perhaps what caused the problem is, a user imported bad data, received a warning, ignored warning , clicked "post" as-is (with bad data) and now it's in AX?可能导致问题的原因是,用户导入了错误数据,收到警告,忽略警告,按原样(带有错误数据)单击“发布”,现在它在 AX 中? And now when you do a 2nd import, and try to use the lookup, it's crashing on that bad-data-relation.现在,当您进行第二次导入并尝试使用查找时,它会因错误的数据关系而崩溃。

Edited: So, while there was an corruption in the DB, the actual culprit was found: the standard AX code creating temp data for the dimension lookup - there was a mod code in Dimensions.insert() that wrote an XML file every dimensions were updated or inserted.编辑:因此,虽然数据库中存在损坏,但发现了真正的罪魁祸首:为维度查找创建临时数据的标准 AX 代码 - 在 Dimensions.insert() 中有一个 mod 代码,它编写了一个 XML 文件,每个维度都是更新或插入。 This took so long in this case that it hang up the client.在这种情况下,这花了很长时间,以至于它挂断了客户端。 I put the code inside an if clause like so:我将代码放在 if 子句中,如下所示:

if(!this.isTemp())
{
  // offending code
}

Problem solved.问题解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM