Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

How to Skip "Select a Record Type to Create" Dialog

Posted on by 90

So i had my own Custom Table & Form. the apps basically run their own system without anything to do with AX core function. Just a supportive apps for our Purchasing Dept works. but these custom apps use VendTable as Master Vendor data for lookup on my form & DirPartyTable to get Vendor Name as view only. I want to avoid using Display Method as it kill filter function (Ctrl + G), so i override write() & validatewrite() methode on both VendTable & DirPartyTable.

Now my issue are, everytime i create new record on my custom table via my form, AX automatically give me "Select a Record Type to Create" form
pastedimage1594888202427v1.png

i dont want to create new record on VendTable or DirPartyTable, but just on my custom table only. is there some way to prevent this dialog showing up?

Thank you.

  • MuthukumaranAX Profile Picture
    MuthukumaranAX 2,897 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    Hi - so the purpose is to show the vendor account and vendor name in the form? But the issue is a dialog show up dirpartytable, correct?

    Thanks

  • Aldis Viesturs Profile Picture
    Aldis Viesturs 5 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    Just use view from dirpartytable containing only need fields instead of table for ex \Data Dictionary\Views\VendDirPartyTableView.

    Use addlink in code to establish relationship.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    Put a breakpoint in the initialization of the "Select a record type to create" dialog / form (find out which one it is) and check what is the call stack. Then you know what calls it, which should help you suppress it.

  • ITIPG Profile Picture
    ITIPG 90 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    pastedimage1595205814652v2.png

    public void create(boolean _append = false)
    {
        //super(_append);
    }

    public boolean validateWrite()
    {
        return true;
    }

    public void write()
    {
        //super();
    }

    all still fail & the dialog still showing up.

    Seems like DirPartyTable is kinda complicated table with so long list of Derived Data Source.

    Anyway, i try to Shift+Enter on the unwanted form dialog

    pastedimage1595206100682v3.png

    When im browsing around for Derived Data Source, i find thing related to Polymorphic to. does it had to do with it?

    community.dynamics.com/.../table-inheritance

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    All form data sources have a create method (since it exists in the underlying FormDataSource class). And it's executed when New "action" is happening. But if you remove super(), then nothing will happen.

    If you don't see it in the "Override method" dialog it means that you've already overridden it and you should see it in the Methods node of the data source.

    Perhaps you could illustrate your situation by sharing a screenshot where we see:

    - All methods of your DirPartyTable data source

    - Contents of the "Override method" lookup for DirPartyTable data source

  • ITIPG Profile Picture
    ITIPG 90 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    i have try it actually.

    my next little experiment on my previous post is done after i try override Create method & remove super() on DirPartyTable datasource. thinking that "does Create method really exist" as it doesnt show up on "right click>override method" list & doesnt give any affect.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    I suggested you to override create method of your DirPartyTable data source and remove super() call. Seems you didn't still try it. Could you try it?

  • ITIPG Profile Picture
    ITIPG 90 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    yes.

    and just now i have try few thing.

    1. i make Create method on my custom table datasource and remove super(). Nothing seems change.

    2. i make CreateRecord method on both DirPartyTable & my own custom table and remove super(). the same, nothing change.

    3. i make CreateRecord method on my Form method and remove super(). this one kill new lines button function. i click and nothing happen.

    with that i assume that Create or CreateRecord method doesnt exist on Datasource Method but it exist on Form Method.

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    You said that you have overridden the Create method. But did you also remove the super() call?

  • ITIPG Profile Picture
    ITIPG 90 on at
    RE: How to Skip "Select a Record Type to Create" Dialog

    override Create Method didnt work either.

    anyway i accidently click action/Reported as abusive to your reply. sorry for that & i cant seems to find a way to cancel my report. Maybe if Mod read this, you can ignore my report. T_T...

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans