How to add custom fields to DirPartyQuickCreateForm in D365 finance and operations?

How to add custom fields to DirPartyQuickCreateForm in D365 finance and operations?

While working with Dynamics 365 Finance & Operations, I recently explored how custom fields added to CustTable automatically appear on DirPartyQuickCreateForm — even though the form itself doesn’t explicitly reference CustTable controls.

At first glance, this feels unexpected. But once you understand the party framework and dynamic control generation, it makes perfect sense.

Let’s break it down 👇

🔍 The Key Insight

DirPartyQuickCreateForm does NOT hardcode individual fields.

Instead, it dynamically generates controls at runtime using:

  • Data sources
  • Table field groups
  • autoDataGroup(true)

This means:

The form adapts itself based on the table context (Customer, Vendor, or Party).

Scenario

Lets suppose we have to add a custom field Registration Id on the new customer form.

Article content
New customer create form.


Now if we check the form name it is DirPartyQuickCreateForm.

CustTable datasource is not available in this form. As you can see in this screenshot.

Article content
Backend of DirPartyQuickCreateForm

🧠 What’s Happening Behind the Scenes

Inside the form, a method like this is used:

/// <summary>
    /// Populate the dynamic field groups
    /// </summary>
    private void addDynamicControls()
    {
        #DirParty
        controlHeader = this.form().design(1).control(formcontrolstr(DirPartyQuickCreateForm, DynamicHeader));
        controlHeader.dataSource(fbds.id());
        controlHeader.dataGroup(#quickCreateHeader);
        controlHeader.autoDataGroup(true);

        controlDetails = this.form().design(1).control(formcontrolstr(DirPartyQuickCreateForm, DynamicDetail));
        controlDetails.dataSource(fbds.id());
        controlDetails.dataGroup(#quickCreateDetails);
        controlDetails.autoDataGroup(true);
    }
        

This tells the framework:

  • Look at the active data source
  • Read the specified field group
  • Automatically render all fields in that group

And here’s the important part:

When quick create is launched from Customers:

  • The active data source becomes CustTable
  • The system reads the QuickCreate field groups from CustTable
  • Any custom field added there appears automatically on the form

✔ No form extension

✔ No control addition

✔ No override


🏗 Why CustTable Fields Appear on a Party Form

Because:

  • Customers are parties
  • CustTable is part of the party framework
  • The quick create form is context-aware

So when you extend:

  • CustTable
  • and its QuickCreateHeader / QuickCreateDetails field groups

Your field appears exactly where users expect it.

Create the extension of CustTable and add your custom field in extension.

Article content
CustTable Extension

Now the main step is here. Locate the quickCreateDetails fields group and Drag and drop the custom field to this group (you can copy and paste).

Article content
Custom field in quickCreateDetails.


Now Build and Synch the project and refresh the front and and add a new customer.

Article content
Custom field added.

✅ Supported & Best-Practice Approach

If your field is:

  • Customer-specific → Add it to CustTable
  • Common for all parties → Add it to DirPartyTable

And always:

  • Extend field groups, not the form
  • Let the framework do the heavy lifting

This approach is:

  • Upgrade-safe
  • Clean
  • Aligned with Microsoft best practices


🎯 Final Takeaway

The real power of D365 F&O lies in understanding how the framework thinks.

Once you work with it — not against it — you’ll realize:

You often don’t need more code… just the right extension point.

💬 Have you ever been surprised by a form behaving “magically” in D365 F&O? Let’s discuss in the comments.

#Dynamics365FO #Xpp #D365Development #ERP #Microsoft #CustTable #DirParty #FinOps

To view or add a comment, sign in

More articles by SHAHZADA PHOOL MUHAMMAD

Others also viewed

Explore content categories