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)

adding New DataSource to an AX Form

(0) ShareShare
ReportReport
Posted on by

Can I add any New DataSource to a AX Form? If Yes, then does the new DataSource have to have relationship with any existing DataSource of that form?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Anna,

    If you add a datasource on a form, the property JoinSource will determine if it is linked to another datasource or not. So when leaving this property empty, the datasource is not linked.

  • Suggested answer
    Community Member Profile Picture
    on at

    yes you can add any new Datasource to a AX form

    relationship with any existing Datasource depends on your requirement and if you have any relationship between table you define it using LinkType property of the datasource

    Following are the steps To Join Data Sources as a Single Data Source

    1. In the AOT, expand the form, and then expand the Data Sources node.

    2. Press CTRL-D to open a second AOT, expand Data Dictionary, and then expand Tables. The AOT lists the tables you can use as a form data source.

    3. To add tables to the form data source, drag two tables and drop each table on the Data Sources node of the form in the first AOT. The tables are added as data sources to the form.

    4. Identify the table you will use as the primary data source. The other table will be the secondary data source.

    5. Click the secondary data source, and set the JoinSource property to the name of the primary data source.

    6. Set the LinkType property of the secondary data source to InnerJoin, OuterJoin, ExistJoin, or NotExistJoin.

    7. Create the form design, and add controls that display fields from the joined data sources. Typically, you use a grid control to display the data from joined data sources.

    8. You might have to add code that updates data in shared fields. This step depends upon the design of your form and might not be required for all forms with joined data sources.

    Please refer following link for more details about LinkType

    msdn.microsoft.com/.../gg844014.aspx

    Please verify and update us if this information is helpful to you.

  • Community Member Profile Picture
    on at

    Thanks André  and Nitesh !

    So it's NOT required for the new data source to have relation with the existing data soure. 

    The reason I am asking this is I got requirement to add couple of new fields to a form. The new attributes are not in any existing datas ource. So I added a new data source which contains the new fields. I successfully modified form with the new attributes. Everything looks good. I didn't specify anything in LinkType property. Basically I want to know how it worked why it worked. I thought it should NOT  work if I left LinkType blank

    If you can explain why it worked that will be great

    Thanks again

  • dolee Profile Picture
    11,279 on at

    Hi Anna,

    In technical sense, an AX form is designed to be capable of retrieving data independently if there are more than one datasource specified in the form object. It's just a fact.

    One common application in AX having independent datasources is the parameters form. (e.g. CustParameters). Look at the JoinSource property (as mentioned in Andre's reply) for the datasources in that form and you'll see most of them are blank. It makes sense that these datasources don't need to be joined in anyway since there will usually only be one record per company per table.

    On the other hand, it obviously doesn't make sense if the datasource you add is related to the main datasource. However, AX as a computer system do not have the ability to make this judgement. It is up to the user/developer to make this call and edit the form datasource property properly.

    Hope it helps.

  • Community Member Profile Picture
    on at

    Thanks for the explanation, Dominic !

    I was still trying to figure out why it worked since the data source that I added is related to the main data sources.

    Although I didn't explicitly put anything in join source property. But I checked table relation it does have relation with one of the existing data source of the form. I guess that's probably  the reason it worked.

    Do you think so?

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