Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

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

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,

  • Suggested answer
    Lahiru Perera Profile Picture
    Lahiru Perera 9 on at
    Field Not Updating when added override method for modified in UI Builder
     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);
    }
  • AbdulKhaliq Profile Picture
    AbdulKhaliq 160 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    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.

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    Are you sure that select in modified method returns something ?

  • AbdulKhaliq Profile Picture
    AbdulKhaliq 160 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    Hi,

    Already tried this, doesn't work.

  • Suggested answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    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
    AbdulKhaliq 160 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    test

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    It would be easier if you share your code.

  • AbdulKhaliq Profile Picture
    AbdulKhaliq 160 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    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.

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Field Not Updating when added override method for modified in UI Builder

    Hi Abdul Khaliq,

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

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,556 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,625 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans