web
You’re offline. This is a read only version of the page.
close
Skip to main content
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.
I have the same question (0)
  • Anton Venter Profile Picture
    20,343 Super User 2025 Season 2 on at
    DialogField bound with parm method of RefRecId type, but a Int64 control is build.
    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 "Jones" Melgaard Profile Picture
    4,894 Most Valuable Professional on at
    DialogField bound with parm method of RefRecId type, but a Int64 control is build.

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans