Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Adding fields to form through field groups to other extensions

(0) ShareShare
ReportReport
Posted on by 1,665

Hi everyone

I'm trying to add a field (MyField) to CustTable by extension (MyExtension). I need to add this field to the CustTable form, however, I need to add it by adding it to the CredManCreditReview field group, which belongs to the CustTable.CredMan extension.

So, I've added my CustTable.MyField field to the CustTable in CustTable.MyExtension, and I added the field to the CredManCreditReview fieldgroup on CustTable.

I can now see the field being reflected in the Form design:

 FormDesign.png_2D00_640x480.png

However, I can't get this field to reflect in the UI. I've done compiles, and cache clears etc., but nothing seems to work.

It seems to be possible:

https://microsoft-business-applications.hcltech.com/customizing/dynamics-365-development-and-customization-field-group-extensions/

But this seems to reflect my problem better:

https://www.gangsta.se/blog/entry/fields-from-different-models-in-one-field-group-in-d365fo

Any ideas?

Thanks

  • Community member Profile Picture
    2 on at
    Adding fields to form through field groups to other extensions
    With this code the form would be started with the fields added in the CredManCreditReview group
     
    internal final class MSCustTableFormEventHandler
    {
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        [FormEventHandler(formStr(CustTable), FormEventType::Initialized)]
        public static void CustTable_OnInitialized(xFormRun sender, FormEventArgs e)
        {
            
            FormGroupControl CredManCreditReview= sender.control(sender.controlId('CredManCreditReview'));
            FormDataSource  dataSource = sender.dataSource();

            if(CredManCreditReview && dataSource)
            {
                CredManCreditReview.addDataField(dataSource.id(), fieldNum(CustTable, Field1));
                CredManCreditReview.addDataField(dataSource.id(), fieldNum(CustTable, Field2));
                CredManCreditReview.addDataField(dataSource.id(), fieldNum(CustTable, Field3));
            }
        }
    }
  • BrandonSA Profile Picture
    1,665 on at
    RE: Adding fields to form through field groups to other extensions

    I can only see my field if I go to the root object (in this case, the form called CustTable), and look at the extension field group from there. But from the actual form extension (ie. CustTable.CredMan), I see no affect to the field group, and that's why it's not visible on the form.  It makes perfect sense to me that I can't make changes to this form extension, because that would effectively be overlayering an extension. What I need here is to be able to extend an extension, which obviously isn't possible.

    CredManForm.png

    If someone wanted to modify the Credit and Collections tab on the CustTable form, how would they go about it? The only way I can see them doing it is by using personalization.

  • BrandonSA Profile Picture
    1,665 on at
    RE: Adding fields to form through field groups to other extensions

    Thanks Alex

    No personalization

  • Alex VN Profile Picture
    1,987 on at
    RE: Adding fields to form through field groups to other extensions

    Hi,

    Can you check if there is any personalization for that form? Is that you are using standard view or a custom view for CustTable form?

  • BrandonSA Profile Picture
    1,665 on at
    RE: Adding fields to form through field groups to other extensions

    Thanks Alex VN.

    Full compile and DB sync are done, but the results are the same.

  • BrandonSA Profile Picture
    1,665 on at
    RE: Adding fields to form through field groups to other extensions

    Hi Andre

    Thanks for the reply. Yes, there is a model ref to the credit management model.

  • André Arnaud de Calavon Profile Picture
    283,862 Test role Public on at
    RE: Adding fields to form through field groups to other extensions

    Hi Brandon,

    Have you set a model reference to the credit management model?

  • Alex VN Profile Picture
    1,987 on at
    RE: Adding fields to form through field groups to other extensions

    Hi,

    Can you check for the field property on form to ensure if the field is correctly setup and if visible property is set to Yes in both Form control and table level?

    Please also do a full build and synchronization to ensure the compilation is working as expected.

    Regards,

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

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

Product updates

Dynamics 365 release plans