[英]How to take value from combo box table microsoft dynamics ax 2012 x++ while select
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
关系的查找。
\\Data Dictionary\\Extended Data Types\\InventLocationId
\\Data Dictionary\\Extended Data Types\\InventLocationId
在这种情况下\\Data Dictionary\\Extended Data Types\\InventLocationId
\\Data Dictionary\\Tables\\InventLocation
表-具有\\Data Dictionary\\Tables\\InventLocation
的引用表 \\Data Dictionary\\Tables\\InventLocation\\Indexes\\InventLocationIdx
, which I believe in this case determines the return value 主键-具有\\Data Dictionary\\Tables\\InventLocation\\Indexes\\InventLocationIdx
的备用主键,我相信在这种情况下,它确定返回值 \\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.