how concatenate 2 values lookup.addLookupfield Dynamics ax

851 views Asked by At

I have no idea how to concatenate 2 values on the same field , I mean something like this:

lookup.addLookupfield(fieldNum(Table, ProductName)," " ,fieldNum(Table,ProductPrice));

This is my code for now:

lookup.addLookupfield(fieldNum(BBP_TableProducts, ProductName));
1

There are 1 answers

0
Jonathan Bravetti On BEST ANSWER

If you have add 2 field in lookup you have to do it in 2 separate lines.

For example:

lookup.addLookupfield(fieldNum(Table, ProductName));
lookup.addLookupfield(fieldNum(Table, ProductPrice));

This is the definition of addLookupfield function

public void addLookupfield(FieldId _fieldId, [boolean _returnItem])

You can't concatenate values in the same addLookupfield function.