简体   繁体   English

选择时如何从组合框表中获取价值Microsoft Dynamics AX 2012 X ++

[英]How to take value from combo box table microsoft dynamics ax 2012 x++ while select

I have table like (1st photo) table 我喜欢表(照片1)

What I should do to take this value to while select in x++? 在x ++中进行选择时,我应该怎么做才能将此值用作? (2c photo) value (2c照片)

The short answer is you would need to take the return from the lookup, find the value in the table via the returned value (key), and take the Name field. 简短的答案是,您需要从查找中获取返回值,通过返回的值(键)在表中找到该值,并获取“ Name字段。

So this would be the data in your case for the first result: 因此,这是您的情况下第一个结果的数据:

InventLocation::find('11').Name

This is what's called a lookup . 这就是所谓的lookup When you do a lookup, there are multiple methods that AX will determine what values to display. 查找时,AX将通过多种方法确定要显示的值。 The one you're looking at is a lookup based upon the Extended Data Type relation. 您正在查看的是基于Extended Data Type关系的查找。

  • EDT - In this case \\Data Dictionary\\Extended Data Types\\InventLocationId \\Data Dictionary\\Extended Data Types\\InventLocationId在这种情况下\\Data Dictionary\\Extended Data Types\\InventLocationId
  • Table - which has a reference table of \\Data Dictionary\\Tables\\InventLocation 表-具有\\Data Dictionary\\Tables\\InventLocation的引用表
  • Primary Key - which has an alternate primary key of \\Data Dictionary\\Tables\\InventLocation\\Indexes\\InventLocationIdx , which I believe in this case determines the return value 主键-具有\\Data Dictionary\\Tables\\InventLocation\\Indexes\\InventLocationIdx的备用主键,我相信在这种情况下,它确定返回值
  • AutoLookup - and the AutoLookup located at \\Data Dictionary\\Tables\\InventLocation\\Field Groups\\AutoLookup determines which fields are displayed to the user as information. AutoLookup-和位于\\Data Dictionary\\Tables\\InventLocation\\Field Groups\\AutoLookup确定哪些字段作为信息显示给用户。

If you want a custom lookup to return the InventLocation.Name field, you should look at the different methods available to you. 如果希望自定义查找返回InventLocation.Name字段,则应查看可用的不同方法。 This blog post is an excellent start to see different methods: https://kashperuk.blogspot.com/2009/04/lookup-methods-tutorial-custom-list.html 这篇博客文章是了解不同方法的一个很好的开始: https : //kashperuk.blogspot.com/2009/04/lookup-methods-tutorial-custom-list.html

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

相关问题 Datagrid markChanged X ++(AX Dynamics 2012) - Datagrid markChanged X++ (AX Dynamics 2012) 如何在Dynamics AX 2012中从X ++生成CIL? - How can I generate CIL from X++ in Dynamics AX 2012? Microsoft Dynamics AX 2012 X ++无法插入记录。 记录已存在错误 - Microsoft Dynamics AX 2012 X++ Can not insert Record. Record Already Exists Error 如何在 Dynamics AX2012 中使用代码 x++ 创建一个 Excel 文件及其 Email? - How to create an Excel file and it by Email, using code x++ in Dynamics AX2012? 如何在Dynamics AX / X ++中获取文件大小? - How to get file size in Dynamics AX / X++? 在Dynamics AX,X ++中,如何增加日期变量 - In Dynamics AX, X++, how do you increment a date variable 如何在Dynamics AX 2012 R2中通过X ++代码确认,挑选销售订单,更新,打包和生成销售订单的发票? - How to confirm, pick sales order, update, pack and generate invoice of a sales order in Dynamics AX 2012 R2 through X++ code? 如何查看X ++ select语句Ax2012之前的SQL表达式? - How to see the SQL expression of an X++ select statement Pre Ax2012? 如何通过AX 2012 X ++中的代码升级工作流 - How To escalate workflow through code in AX 2012 X++ 在 ax 2012 x++ 中构建查询时如何使用 AND/OR 运算符 - How to use AND/OR operators when building query in ax 2012 x++
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM