Announcements
a
Thanks, that's what I needed to know! :)
marked as Verified, thank.
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.
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.
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.
Hi Gunjan,
they are both on the same data source(table) of the form.
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?
André Arnaud de Cal...
293,289
Super User 2025 Season 1
Martin Dráb
232,068
Most Valuable Professional
nmaenpaa
101,156
Moderator