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.
So this would be the data in your case for the first result:
InventLocation::find('11').Name
This is what's called a lookup
. When you do a lookup, there are multiple methods that AX will determine what values to display. The one you're looking at is a lookup based upon the Extended Data Type
relation.
\\Data Dictionary\\Extended Data Types\\InventLocationId
\\Data Dictionary\\Tables\\InventLocation
\\Data Dictionary\\Tables\\InventLocation\\Indexes\\InventLocationIdx
, which I believe in this case determines the return value \\Data Dictionary\\Tables\\InventLocation\\Field Groups\\AutoLookup
determines which fields are displayed to the user as information. If you want a custom lookup to return the InventLocation.Name
field, you should look at the different methods available to you. This blog post is an excellent start to see different methods: https://kashperuk.blogspot.com/2009/04/lookup-methods-tutorial-custom-list.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.