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, ...
Answered

a

(0) ShareShare
ReportReport
Posted on by 4

a

Categories:
I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Fachuh,

    Are both of these fields in the same table? Or are they string controls on your form not bound to a data source?

  • hfou Profile Picture
    4 on at

    Hi Gunjan,

    they are both on the same data source(table) of the form.

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Fachuh,

    In that case, it will be best to override modifiedField method in the table and assign the value to Field "B" when Field "A" is modified.

    public void modifiedField(FieldId _fieldId)
    {
        super(_fieldId);
    
        switch (_fieldId)
        {
            case fieldNum(Table, FieldA) :
                this.FieldB = this.FieldA;
                break;
        }
    }

    For an example, you can check CustTable\modifiedField method.

  • hfou Profile Picture
    4 on at

    Hi Gunjan,

    thanks, it works for me when I use that code with next modifiedField(_fieldId), instead of super(_fieldId).

    I am just not sure what is the difference, why there can not be used super(_fieldId)? And is it possible to use events for this task? Because I was told to solve this by event.

    Sorry if it is stupid question, I am working in x++ for a few weeks only.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Fachuh,

    I assumed you were working with a custom table and not a standard one. In case of standard tables, you have to create a CoC on the standard methods  insert, update, modifiedField etc.), since you can't make any changes to standard code. You can learn more about CoC from this link.

    For custom tables, you have the option to override methods. That's where super call is made.

    In case your issue is resolved, please mark the useful answer(s) as Verified. It's done by Did this answer your question? > Yes in the reply.

  • hfou Profile Picture
    4 on at

    Thanks, that's what I needed to know! :)

    marked as Verified, thank.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 514 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans