# Calling custom methods from a different view without messages

**URL:** <https://forum.inductiveautomation.com/t/calling-custom-methods-from-a-different-view-without-messages/37499>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [August 7, 2020, 1:00pm UTC](https://forum.inductiveautomation.com/t/calling-custom-methods-from-a-different-view-without-messages/37499 "2020-08-07T13:00:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeryavec](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@aeryavec](https://forum.inductiveautomation.com/u/aeryavec)\
**Post date:** [August 7, 2020, 1:00pm UTC](https://forum.inductiveautomation.com/t/calling-custom-methods-from-a-different-view-without-messages/37499/1 "2020-08-07T13:00:13Z")

</div>

I am trying to determine the most effective way to call a custom method on a main view from a popup opened by a button on the main view. Since the popup is a different view than the main view I am unable to directly reference the custom method using getParent() in the scripts on the popup.

Currently I have the popup send a message at session scope and then call the custom method in the message handler on the main view. I am wondering if there is a better way to do this, ie. is it possible to call the custom method from the popup if I pass the view ID in as a parameter.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 7, 2020, 1:26pm UTC](https://forum.inductiveautomation.com/t/calling-custom-methods-from-a-different-view-without-messages/37499/2 "2020-08-07T13:26:43Z")

</div>

Messaging is the right answer. Consider using page scope instead of session scope.
