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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

DialogField bound with parm method of RefRecId type, but a Int64 control is build.

(2) ShareShare
ReportReport
Posted on by 57
Hi Experts,
 
I am facing a strange issue with DialogField.
 
The following method is in contract class
 
    public DWFS_FilmFabricCountryOrigRecId parmFabricCountryOrig(DWFS_FilmFabricCountryOrigRecId _fabricCountryOrig = fabricCountryOrig)
    {
        fabricCountryOrig = _fabricCountryOrig;
        return fabricCountryOrig;
    }
 
The EDT DWFS_FilmFabricCountryOrigRecId is extends RefRecId, and the Reference Table is set. I am sure that the settings are correct because when I drag this EDT to table, relation will be added automatically.
 
However, when a DialogField is bound with this method in UIBuilder class, a FormInt64Control is generated instead of a FormReferenceControl.
 
Can anyone tell me what I am missing?
 
Thanks.
  • Anton Venter Profile Picture
    21,367 Super User 2026 Season 2 on at
    I have not investigated this and I have not faced this before so I don't have an answer to your question about why the system is not adding the ref. group control automatically. However, I have some suggestions as a work around. Perhaps you can override a method your UIBuilder class to manually add this field or create a custom form as your dialog.
  • Jonas Melgaard Profile Picture
    5,019 Most Valuable Professional on at

    I got a bit curious and had a play. If the reference group is generated with you add the field to a table, then it should work.


    Is this what you are seeing?

    Is the dialog also broken? I.e. can you see the reference group.

     

    My best guess is that it's either a cache issue, or a full compilation of the model is needed.

     

    These are my example classes:

    [
        DataContract,
        SysOperationContractProcessing(classStr(TestServiceUIBuilder))
    ]
    internal final class TestServiceContract
    {
        InventPackagingUnitRefRecId packUnitRefRecId;
        [DataMember]
        public InventPackagingUnitRefRecId parmPackUnit(InventPackagingUnitRefRecId _packUnitRefRecId = packUnitRefRecId)
        {
            packUnitRefRecId = _packUnitRefRecId;
            return packUnitRefRecId;
        }
    }
     
    internal final class TestServiceUIBuilder extends SysOperationAutomaticUIBuilder
    {
        private DialogField packUnitField;
        public void postBuild()
        {
            super();
            // Get reference to packUnitField dialog field
            packUnitField = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(TestServiceContract, parmPackUnit));
            
            FormBuildReferenceGroupControl ctrl = packUnitField.control();
        }
    }


     

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 217

#3
Subra Profile Picture

Subra 200 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans