web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

change lookup datasource on combo box selection

(0) ShareShare
ReportReport
Posted on by 165

Hello,

I am very new to Ax 2012. I have a scenario, I wanted to change lookup datasource on combo box value selection. Both the columns are in my grid. A dropdown column on which value selection i need to change the datasource of adjacent lookup datasource. Please help

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dan Emreus Profile Picture
    1,162 on at

    Hi Xainu Khan,

    There is several ways to accomplish this and it is hard to provide the best solution based the input provided. Have you looked at this post?

    http://msdn.microsoft.com/EN-US/library/hh185372.aspx

    There are many lookups made in forms in the system so if you want an example you can search for the word lookup in e.g form PurchTable or CustTable.

    Hope this helps.

    /Dan

  • Xainu Khan Profile Picture
    165 on at

    Hello Dan,

    I think you didn't my point properly. I want to change the datasource of lookup on the selection of adjacent combo box. Please help if you know. Thanks anyways. :)

  • Suggested answer
    Dan Emreus Profile Picture
    1,162 on at

    Like I said before there is a lot of ways to create a lookup and you probably have to change the lookup method if exists or create a new one with relation to your field.

    If you need more help I need to know the field and table and how it is related to the datasource from where you want to get your values.

    /Dan

  • adam260 Profile Picture
    1,871 on at

    If you would like to use a combo box with a "key, value" pair then what you need to do is create a control type called "ReferenceGroup". Create a "FieldGroup" on the table you want to display the records from. Then set the "referencefield" property on the "reference group" to the field you want to save and then set the replacementfieldgroup property to the field group from the table. Once you have done this you can use the loop up method found at axcalated.blogspot.com/.../basic-lookups-and-referenced-field.html  which shows you how to write a lookup method for a reference group field to hijack the reference field to display any fields you would like.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans