# Trigger button on custom node

**URL:** <https://discourse.nodered.org/t/trigger-button-on-custom-node/14625>\
**Category:** General\
**Created:** [22 August 2019 00:45 UTC](https://discourse.nodered.org/t/trigger-button-on-custom-node/14625 "2019-08-22T00:45:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![limengsong](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/limengsong/32/9391_2.png) [@limengsong](https://discourse.nodered.org/u/limengsong)\
**Post date:** [22 August 2019 00:45 UTC](https://discourse.nodered.org/t/trigger-button-on-custom-node/14625/1 "2019-08-22T00:45:47Z")

</div>

hi~  
I want to make a custom node, like the inject node, with a button for data injection.  
However, I found that the inject node injection cannot be in the sub-process and will prompt an warning.  
I would like to ask how to do a similar injection in the sub-process, you can inject data.  
Thank you！

```auto
 RED.notify(RED._("notification.warning", {message:RED._("notification.warnings.nodeActionDisabledSubflow")}),"warning");

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/45322b4ca0e5f8f43f63a3685949c90caf0b404e.png)

---

<div class="post-metadata">

**Author:** ![limengsong](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/limengsong/32/9391_2.png) [@limengsong](https://discourse.nodered.org/u/limengsong)\
**Post date:** [22 August 2019 01:03 UTC](https://discourse.nodered.org/t/trigger-button-on-custom-node/14625/2 "2019-08-22T01:03:35Z")

</div>

I want to use the button on the Debug or Inject node to toggle its enabled/disabled state in the subflow。

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [22 August 2019 06:46 UTC](https://discourse.nodered.org/t/trigger-button-on-custom-node/14625/3 "2019-08-22T06:46:07Z")

</div>

You cannot do that.

When you are editing a subflow template, you are editing the _template_ , not an instance.

If you have 10 instances of the subflow in your flows, and you click an Inject node button in the template, which of the 10 instances should be triggered? This is why the buttons are disabled when editing the subflow.
