SBX - Search With Button

SBX - Forum Post Title

Lookup filter

Microsoft Dynamics AX Forum

AX Ankit asked a question on 14 Jun 2018 1:52 PM

Question Status

Suggested Answer

Hello,

I need help on automated filter on lookup.

So here is the case. When I click on any "Customer Account" lookup say in "Sales order form" I can filter it by just typing some text in the field. If I type the customer name it filters the customers and show only those records in lookup which matches the text entered in the lookup field. How this can be done for any custom field?

I have a EDT "XY" and have used it as a primary key in a table "ABC" which has 2 fields "XY" and "Description". I have set the "Table reference" property on EDT to "ABC".

When I use this field in any form it is showing me the lookup of the data in table "ABC". But I want if I enter some value which matches the "Description" field of my table it should filter the record in lookup.

It is filtering the records fine if I  enter text matching to "XY" field but not for "Description".

 

Reply
Sohaib Cheema responded on 14 Jun 2018 2:05 PM
My Badges

following support article should be valid in MSDyn365fo as well.

blogs.msdn.microsoft.com/.../using-the-new-keyword-search-option-to-create-sales-orders-in-dynamics-ax-2012-r3

and a video

www.youtube.com/watch;feature=youtu.be

Reply
AX Ankit responded on 14 Jun 2018 3:09 PM

- Thanks for your response but I believe I am looking for something different. I am attaching an image for your reference.

In the below image, I entered value "High" and the dropdown was filtered with only those items for which "Item Name" matches to the text.

Reply
Suggested Answer

The fields which you refer to are using x++ lookup methods instead of normal automatic lookups that are based on table relation.

On the calling form, you will find method called lookup either on the field control, or on the data source field. That method usually calls the actual lookup method which you will find on the corresponding table.

When you examine those methods, you should be able to create similar lookups in your own fields. You can also google for x++ custom lookups.

Reply
Suggested Answer

The fields which you refer to are using x++ lookup methods instead of normal automatic lookups that are based on table relation.

On the calling form, you will find method called lookup either on the field control, or on the data source field. That method usually calls the actual lookup method which you will find on the corresponding table.

When you examine those methods, you should be able to create similar lookups in your own fields. You can also google for x++ custom lookups.

Reply

SBX - Two Col Forum

SBX - Migrated JS