Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

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

  • 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans