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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Add new field from CustTable in DirPartyQuickCreateForm

(0) ShareShare
ReportReport
Posted on by 123

Hi,

I have to add a new field (Invoice account) DirPar.tyQuickCreateForm. I am not finding a way how to add this field.  I know that I should use dirpartyentity  but I am not sure how it works. Are fields in this form added by code? How can I add this field in there?

Thanks,

Enxhi

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,932 Most Valuable Professional on at

    No, fields aren't added in code. You don't see controls such as Name_FirstName in the design as usual?

  • Enxhi Bregu Profile Picture
    123 on at

    No the controls in this form are not as usual. There are some dynamic controls and I think they change depending on the caller, but I am not finding how they add the controls.

  • Suggested answer
    Martin Dráb Profile Picture
    239,932 Most Valuable Professional on at

    Whether some controls are changed from code or not isn't important (or unusual). Controls are defined in the design as usual and you can extend the form as usual too. After adding the table field, create a form extension and drag the datasource field to the design.

  • Enxhi Bregu Profile Picture
    123 on at

    The field is from CustTable. There are other fields from custtable but I can not find the controls in the form

  • Enxhi Bregu Profile Picture
    123 on at

    What If I  just need a new field to get input from the user for  storing it in custtable?

  • Martin Dráb Profile Picture
    239,932 Most Valuable Professional on at

    I don't think you should do it at all. This is a general-purpose form, it's not used only for customers. Therefore I don't think you should put customer-specific fields there, despite the fact that it's technically possible.

  • Enxhi Bregu Profile Picture
    123 on at

    But I have to do it. There are other controls that are used to get input for CustTable. I just do not understand how this controls are added in a dynamic way, through code. For example VatNum, I do not understand how this control is added. there is a class for the form event handlers that handles this, but I just need  some explanation, how it works.

    private void registerCustTableEventHandlers(FormRun _formRun) is the methot that I think that is responsilble for this, isnt it?

  • Suggested answer
    Martin Dráb Profile Picture
    239,932 Most Valuable Professional on at

    DirPartyQuickCreateForm is defined in the Directory package and it can't use anything defined in Application Suite, such as CustTable. But fields can be added in form extensions and classes in other packages can subscribe to form events and execute any logic (including adding fields). It's exactly what happens in DirPartyQuickCreateFormApplicationSuiteEventHandlers class.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans