# How to link a product to a button automation in the entity screen

**URL:** <https://forum.sambapos.com/t/how-to-link-a-product-to-a-button-automation-in-the-entity-screen/6135>\
**Category:** V4 Question\
**Created:** [July 2, 2015, 8:28pm UTC](https://forum.sambapos.com/t/how-to-link-a-product-to-a-button-automation-in-the-entity-screen/6135 "2015-07-02T20:28:00Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [July 3, 2015, 5:23pm UTC](https://forum.sambapos.com/t/how-to-link-a-product-to-a-button-automation-in-the-entity-screen/6135/5 "2015-07-03T17:23:09Z")

</div>

> [@QMcKay](#):
>
> You will not be able to make the page interact with SambaPOS in most cases with v4. It may be possible in v5 via scripting and some Helper Objects.

Yes a little advanced but inside HTML Viewer Widget we can access few SambaPOS functions.

> [@Help is needed with Set Widget Value action](http://forum.sambapos.com/t/help-is-needed-with-set-widget-value-action/2789/81):
>
> Update 2: I’ve added three js functions that can be run inside browser widget so your webapps can execute SambaPOS functions. window.external.ExecuteAutomationCommand(\<CommandName\>,\<CommandValue\>); window.external.GetSettingValue(\<SettingName\>); window.external.SetSettingValue(\<SettingName\>,\<SettingValue\>); I hope @JohnS notice that slight_smile

Enabling widget’s `Scriptable` setting will enable this feature.

Example

HTML File

 ![](https://forum.sambapos.com/uploads/default/original/2X/1/1e2e1d2a6e0a01da879bd4f3a50ad6b4e728fce6.jpg) 

Displays in HTML Viewer

 ![](https://forum.sambapos.com/uploads/default/original/2X/c/c6e6d190683ff5e6bde3de13d1eaa26578417f23.jpg) 

Clicking `Click Me` button executes automation command.

 ![](https://forum.sambapos.com/uploads/default/original/2X/0/0a9b774596ff3ab646fdfa9cf20718f138500378.jpg) 

Rule Setup

 ![](https://forum.sambapos.com/uploads/default/original/2X/f/ff66565188c5ff729d974d1b5681cd14d2bf430c.jpg) 

I hope you’ll be able to connect pieces.

PS: @QMcKay sorry for publishing your wifi password. still working on your setup 😉

---

_[View the full topic](https://forum.sambapos.com/t/how-to-link-a-product-to-a-button-automation-in-the-entity-screen/6135)._
