[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2184
  • Last Modified:

How to get many values from lookup form axapta?

Hi All,

I've created a SysTableLookupForm with several lookup fields.
Is it possible to get the values of all lookup fields in the selected line after performFormLookup()?
As far as I know, SysTableLookup.performFormLookup() gives back only the values of the first lookup field.

1 Solution
It's been a few months since my last AX project, and I don't have AX available right now so I can't verify my suggestion, but couldn't you simply put the single return value into a variable, then use that variable as an argument in a query to return the entire table?

Suppose you do a lookup on InventTable, it would be something like:

ItemId itemId;
InventTable inventTable;
itemId = //put code here to perform lookup
select inventTable where inventTable.ItemId = itemId;
//do something with inventTable
wurthphoenixAuthor Commented:

yes, you're right.  This is the solution, which I used to solve my problem.
With specifying the second parameter of SysTableLookup.addLookupField(fieldId, returnItem) I was able to get the value of any field, not just the firstly added lookup field.
Although your suggestion is not the exact answer to my question but I think, there's no chance to get _all_ lookupfield-value, therefore I accept your soluton.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now