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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Adding field to BOMCalcTrans form - Issue with joining datasources

(0) ShareShare
ReportReport
Posted on by 55

Hi All,

I am adding several fields to the BOMCalcTrans form. I was able to add some of the fields using Display methods on the 'BOMCalcTransDetailUnionAll' view. I also need to add Vendor name to the grid, but not as a display method since it needs to be able to be filtered/sorted by. 

From BOMCalcTrans I should be able to get the Vendor ID, and then get the Party from VendTable to get the name from DirPartyTable using outer joins. I used this method before in other forms without issue.

pastedimage1660841501739v1.png

The issue here is, when I add VendTable and DirPartyTable as form data sources, the columns in the grid are blank. I added VendTable as outer joined with its source as BOMCalcTrans:

pastedimage1660841729992v2.png

pastedimage1660841765882v3.png

I added DirPartyTable, with its join source as VendTable: 

pastedimage1660841849419v4.png

I then added the AccountNum field from VendTable, and the Name field from DirPartyTable to the grid: 

pastedimage1660841921944v5.png

pastedimage1660841978295v6.png

pastedimage1660842002268v7.png

Both AccountNum and Name columns in the grid are blank. All the correct record lines are returned, the added fields are just never populated.

I see that BOMCalcTrans is actually a view, 'BOMCalcTransDetailUnionAll':

pastedimage1660842140582v8.png

I haven't added fields to a form with the data source setup like this yet. I searched around this forum and in the MS docs and was not able to find or determine the correct way to go about adding the fields to this form. I'm aware that in some forms I need to add the new fields to the query, but in this case the underlying query for BOMCalcTrans is a union query, which I'm not familiar with. 

Any help or nudge in the right direction would be greatly appreciated. Thank you!

I have the same question (0)
  • Verified answer
    essnw Profile Picture
    40 on at

    As you mentioned, the data source on that form is actually the BOMCalcTransDetailUnionAll view. The relation you are looking at is for the BOMCalcTrans table so its not valid in this scenario. In the user interface if you right click on a control in the form, hover over "form information" and then click the "form name" it will open a window with more details including the query it is using. You will probably see that it is joining on fields that don't make sense.

    To resolve it you will need to use one of these approaches:

    1. Write a chain of command method for the init method of the VendTable datasource where you clear the links and then define your own similar to the example here: Joining datasources by name in AX 2012 form - Stack Overflow
    2. Use an extension to add VendTable and DirPartyTable to the view. This may require adding them to the views it is combining.
    3. Use an extension to add the relation to VendTable to the view.

    Personally I would go with option 1. 3 is easier but I don't like adding relations to standard objects unless it is for a custom field/table.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 584 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 518

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans