web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Get name of field which triggered onchange event - CLient API / Java script / Dynamics 365

(0) ShareShare
ReportReport
Posted on by 5

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 have the same question (0)
  • Verified answer
    Nya Profile Picture
    29,060 on at

    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”.

     pastedimage1621826404796v1.png

    Then you’ll get the name of the field when you change the value of it.

     pastedimage1621826409776v2.png

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans