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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Suggested Answer

Field Not Updating when added override method for modified in UI Builder

(0) ShareShare
ReportReport
Posted on by 160

Hi,

I have two fields in the Contract and UI Builder, one is worker dropdown and other is a custom field, I have put some logic on the modified method of Worker Field(which is working perfectly fine) but the issue is that the Worker field doesn't get updated after I modify it. Any help ?

Regards,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi Abdul Khaliq,

    Did you call _control.modified() in your method ? It acts like super() and without it value won't be updated.

  • AbdulKhaliq Profile Picture
    160 on at

    The modified method is working fine as the second value that I need to update based on worker is updating perfectly fine, just the worker field is not updating according to the selection.

  • Mea_ Profile Picture
    60,284 on at

    It would be easier if you share your code.

  • AbdulKhaliq Profile Picture
    160 on at

    test

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    In the postBuild method of UIBuilder class replace this statement

    dialogFieldWorker.registerOverrideMethod(methodstr(FormReferenceGroupControl, modified), methodstr(KSSalaryCertificateUIBuilder, workerModified), this);

    with this statement to get the desired value

    dialogFieldWorker.registerOverrideMethod(methodstr(FormStringControl, modified), methodstr(KSSalaryCertificateUIBuilder, workerModified), this);


  • AbdulKhaliq Profile Picture
    160 on at

    Hi,

    Already tried this, doesn't work.

  • Mea_ Profile Picture
    60,284 on at

    Are you sure that select in modified method returns something ?

  • AbdulKhaliq Profile Picture
    160 on at

    I think I have not elaborated correctly, the thing is, the field(Date) tat I am setting based on the select query is working perfectly, the problem is with Worker field i.e. it doesn't get updated when I change the selection, the date field updates perfectly in all cases.

  • Suggested answer
    Lahiru Perera Profile Picture
    9 on at
     public boolean modifyFTRField(
            FormStringControl _formControl)
        {
            boolean ret;
            ret = _formControl.modified();
            dialogLaysheetId.value('');
            return ret;
        }
     
    public void postBuild()
        {
            super();
      dialogFTRNumber.registerOverrideMethod(methodStr(FormStringControl, modified),methodStr(HGITFabricRelaxationUIBuilder, modifyFTRField), this);
    }

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans