# aplication.getMethodTriggerElementName behaviour

**URL:** <https://forum.servoy.com/t/aplication-getmethodtriggerelementname-behaviour/3025>\
**Category:** Classic Servoy\
**Created:** [November 7, 2004, 9:10am UTC](https://forum.servoy.com/t/aplication-getmethodtriggerelementname-behaviour/3025 "2004-11-07T09:10:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![faheemhameed](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@faheemhameed](https://forum.servoy.com/u/faheemhameed)\
**Post date:** [November 7, 2004, 9:10am UTC](https://forum.servoy.com/t/aplication-getmethodtriggerelementname-behaviour/3025/1 "2004-11-07T09:10:12Z")

</div>

Hi there,

I have a method called new\_record() which is called through a button on a form and also through the “New record” servoy function ( here I am overriding the servoy’s default method)

The application.getMethodTriggerElementName() is returning the last method trigger element name properly when I click the “new record” button in the form. But when I press Ctrl + N to activate the “new record” method it returns the last method trigger element name instead of returning empty.

I think the application.getMethodTriggerElementName() should only return the name of the element inside the method (& also the method’s sub methods) that element is attached to.

Thanks  
Hameed

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [November 8, 2004, 2:22pm UTC](https://forum.servoy.com/t/aplication-getmethodtriggerelementname-behaviour/3025/2 "2004-11-08T14:22:39Z")

</div>

i tested this and can’t reproduce it.  
It does return null if i do attach the same method to a button and an form action. And i go through the form methods or accelerator.
