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

Community site session details

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

“Select record type to create” dialog appears when adding a new record

(3) ShareShare
ReportReport
Posted on by 206

Hello Everyone,

I have a custom table MET_ToolingRoomProdTable in Dynamics 365 Finance & Operations used to record spare part work orders.

In this table, I store the ItemId (EDT: ItemId) that references a product in InventTable.

To make the form more user-friendly, I wanted to display the item’s Name and Description (from EcoResProductTranslation) directly in the grid and make those columns filterable — so I added joined datasources:

MET_ToolingRoomProdTable (Main)
 └─ InventTable (JoinSource = MET_ToolingRoomProdTable)
     └─ EcoResProduct (JoinSource = InventTable)
         └─ EcoResProductTranslation (JoinSource = EcoResProduct)
 
All joins are working correctly, and the Name and Description fields are now visible and filterable in the grid.
I also set a language filter (e.g. LanguageId = 'en-US') on EcoResProductTranslation.+
However, since I added these joined datasources, every time I click New in the form to create a new work order, a dialog box pops up asking to create a new item.

It looks like the form is trying to insert a new InventTable record automatically when the main table record is created — even though I don’t want that.
 
I already made sure of the following for all child datasources (InventTable, EcoResProduct, EcoResProductTranslation):
  • AllowCreate = No
  • AllowEdit = No
  • AllowDelete = No
  • InsertIfEmpty = No
  • LinkType = OuterJoin
How can I prevent the dialog from appearing while keeping the joined datasources for display/filtering purposes?
Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,716 Super User 2025 Season 2 on at
    “Select record type to create” dialog appears when adding a new record
    Hi JeanB,
     
    Can you tell us if you need the New button at all or what other record should be created? What is the main data source for the grid and the form design?
  • JeanB Profile Picture
    206 on at
    “Select record type to create” dialog appears when adding a new record
    Hello, thanks for your message. 
    The main data source is the MET_ToolingRoomProdTable. When clicking on new, I want to create a record in the main ds only. The other ds are here for retrieve information.
    Am I missing something on the way of working of the data source? 
  • Suggested answer
    Martin Dráb Profile Picture
    237,662 Most Valuable Professional on at
    “Select record type to create” dialog appears when adding a new record
    It indeed does try to create new records of all the joined tables. The dialog is actually related to products, but you have a problem with all the tables.
     
    You need to explicitly disable the creation by overriding two methods of the joined data sources
    • write() not to call super(). This will prevent saving of any changes of the joined data sources, which you have there just for reference and your intention isn't changing them.
    • validateWrite() not to call super() and always returning true. Without it, saving of your table could be blocked by a validation of one of the other tables, which you don't really want to modify.
  • JeanB Profile Picture
    206 on at
    “Select record type to create” dialog appears when adding a new record
    Hello Martin, thanks a lot for your response !
     
    I wrote these method for all childs data sources. But I still have the message. Is my code correct ?
     
    What about the delete methods (delete and ValidateDelete) ?
     
        [DataSource]
        class InventTable
        {
            public void write()
            {
            }
    
            public boolean validateWrite()
            {
                return true;
            }
    
        }
    
        [DataSource]
        class EcoResProduct
        {
            public void write()
            {
            }
    
            public boolean validateWrite()
            {
                return true;
            }
    
        }
    
        [DataSource]
        class EcoResProductTranslation
        {
            public void write()
            {
            }
    
            public boolean validateWrite()
            {
                return true;
            }
     
    I put, as remainder, the problem I have. I understand that all ds child are impacted :
     
  • JeanB Profile Picture
    206 on at
    “Select record type to create” dialog appears when adding a new record
    Hello everyone,
    Any idea what I did wrong?
    Thanks,
  • Martin Dráb Profile Picture
    237,662 Most Valuable Professional on at
    “Select record type to create” dialog appears when adding a new record
    Then code looks good; the record seems to be created somewhere else. Use the debugger to find out where.
  • Verified answer
    JeanB Profile Picture
    206 on at
    “Select record type to create” dialog appears when adding a new record
    Hello everyone,
     
    I didn't get succeed with the 3 tables joined in the form. So I created a view getting the description and name from EcoResProductTranslation :
     
    InventTable
         └─ EcoResProduct (JoinSource = InventTable)
             └─ EcoResProductTranslation (JoinSource = EcoResProduct)
     
    And I added this view to the form as datasource. It's not perfect but that works.
     
    Thank you all for your support !

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 724 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 619 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 400 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans