Notifications
Announcements
a
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?
Hi Gunjan,
they are both on the same data source(table) of the form.
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.
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.
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 673 Super User 2025 Season 2
Abhilash Warrier 391 Super User 2025 Season 2