# Handling "Event" Parameter when running as Headless Client

**URL:** <https://forum.servoy.com/t/handling-event-parameter-when-running-as-headless-client/18838>\
**Category:** Classic Servoy\
**Created:** [May 3, 2016, 5:30am UTC](https://forum.servoy.com/t/handling-event-parameter-when-running-as-headless-client/18838 "2016-05-03T05:30:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [May 4, 2016, 5:26am UTC](https://forum.servoy.com/t/handling-event-parameter-when-running-as-headless-client/18838/4 "2016-05-04T05:26:34Z")

</div>

Hi, I would extract as much as possible of the logic and put it into a (global) scope or an entity scope, passing JSRecords as parameters.

```auto
{JSRecord<db:/yourdbname/yourtablenamehere>}

```

Then rebuild the functionality of the UI using these functions. The code in the UI will become much shorter, reusing the elements needed by the batch processor.

This way you can debug and check the logic in the Developer, which is much much easier than trying to work out what is happening in a headless client.

Hope this helps,

---

_[View the full topic](https://forum.servoy.com/t/handling-event-parameter-when-running-as-headless-client/18838)._
