如何在 Dynamics AX 2009 的视图中加入字段值
我需要创建一个视图来导出一些产品数据。理想情况下,我需要合并两个字段值(如果可能的话,可能是其他字段值)。
我知道 AX 中的 SQL 并不是真正正确的 SQL,正如我尝试过的那样:
Select field1 + field2 from table
哪个应该有效,但没有
我感觉我可以使用视图中的方法来实现此目的,但我以前从未这样做过,而且我可以'在任何地方都找不到任何合适的例子。
我想做的事情是否可能,如果可以的话我会怎么做?
编辑
我这样做的原因是因为我已经开始使用 Magento。它没有与 AX 正确集成,因此我将创建一个包含有关产品的所有数据的视图,然后手动导入到 Magento 中。
我想将产品的 SKU 与颜色 id 或尺码 id 结合起来。
因此 PP1234 和 BLU 将成为 PP1234-BLU
I need to create a View for exporting some Product Data. Ideally I need to merge two fields values (maybe others if possible).
I know SQL in AX is not really proper SQL as I've tried:
Select field1 + field2 from table
Which should work and it doesn't
I have a feeling I could this with a method in the View, but I've never done this before and I can't find any decent examples anywhere.
Is what I want to do even possible, and if so how would I do it?
Edit
The reason I'm doing this is because I've started using Magento. Its not properly integrated with AX so I was going to create a view with all the data about a product and then do a manual import into Magento.
I want to combine the the SKU of the product with the color id or size id.
So PP1234 and BLU would become PP1234-BLU
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试一下
try that
您也许可以创建一个临时表,如果它适合您的目的,您可以将其用于导出......
You can probably create a staging table, which you would be able to use for export, if it suits your purpose...
通过查看有关 Dynamics AX 的少量文档,我认为这是不可能做到的。
您可以执行的 SQL 量很少,这似乎很奇怪。
From looking around through the little amount of Documentation there is about Dynamics AX I don't think this can be done.
Seems strange the little amount of SQL you can do.
您没有提到为什么要将这两个字段添加在一起,但如果只是为了演示,那么可以通过在表实例上使用显示方法轻松解决这个问题。
由于您使用的是 X++,并且正在进行导出,所以我不明白为什么您不能将计算作为导出的一部分进行。
希望这有帮助。
You don't mention why you want to add those two fields together, but if it is merely for presentation, then this can easily be solved by using a display method on the table instance.
Since you're using X++, and you're doing exporting, I don't understand why you can't do the calculation as a part of the export.
Hope this helps.