I want to define some logic based on which field triggered the onchange event.
How can I get the field name in javascript code? any OOTB function?
I want to define some logic based on which field triggered the onchange event.
How can I get the field name in javascript code? any OOTB function?
Hi,
You can insert the following JavaScript function into the field.
function showname(executionContext){
alert(executionContext.getEventSource().getName());
}
And remember to tick the option of “Pass execution context as first parameter”.
Then you’ll get the name of the field when you change the value of it.
If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.
Best Regards,
Nya
Adis
136
Super User 2025 Season 1
Sohail Ahmed
81
Jonas "Jones" Melgaard
77
Super User 2025 Season 1