# How to inject a button in material Defects view action bar?

**URL:** <https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842>\
**Category:** Extensibility\
**Created:** [September 10, 2026, 9:11am UTC](https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842 "2026-09-10T09:11:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erchuang\_Shang](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@Erchuang\_Shang](https://community.criticalmanufacturing.com/u/Erchuang_Shang)\
**Post date:** [September 10, 2026, 9:11am UTC](https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842/1 "2026-09-10T09:11:50Z")

</div>

Hi General, I want to inject a button in material Defects view action bar as below.

 ![image](https://canada1.discourse-cdn.com/flex050/uploads/community_criticalmanufacturing/original/2X/a/a3223acf9ab8212b66b4fe1ccb6fcec687846ba9.jpeg)

Because all of those Views have the same action bar id. So if I go to other Views, the injection button still existing.

 ![image](https://canada1.discourse-cdn.com/flex050/uploads/community_criticalmanufacturing/original/2X/3/3db04c8c37c15d3ee4b08079f40ea7a5ad6b56f2.jpeg)

The code is shown below:

 ![image](https://canada1.discourse-cdn.com/flex050/uploads/community_criticalmanufacturing/original/2X/5/5e2a49c073bbd216808b91147dca723cbc7a9b8d.jpeg)

 ![image](https://canada1.discourse-cdn.com/flex050/uploads/community_criticalmanufacturing/original/2X/5/5384f79256521e7c387855a7c6da7937e110b05b.jpeg)

And another question, after selected a Defect item, then clicking the injection button, it seems I can’t get the selected data.

So I’d like to ask if you know how to handle the above problems? Thank you.

---

<div class="post-metadata">

**Author:** ![Johann\_Knorr](https://yyz2.discourse-cdn.com/flex050/user_avatar/community.criticalmanufacturing.com/johann_knorr/32/1355_2.png) [@Johann\_Knorr](https://community.criticalmanufacturing.com/u/Johann_Knorr)\
**Post date:** [September 10, 2026, 10:08am UTC](https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842/2 "2026-09-10T10:08:35Z")

</div>

Hi,

If I were you I would be looking into extending or overwriting the actual view you want to edit.

[https://developer.criticalmanufacturing.com/11.3/explore/guides/customizations/presentation/entitypageviews/#modifying-an-existing-view](https://developer.criticalmanufacturing.com/11.3/explore/guides/customizations/presentation/entitypageviews/#modifying-an-existing-view)

At least that’s where the documentation seems to be pointing.

That view has its own action bar and maybe (hopefully) you can inject your action button there directly

---

<div class="post-metadata">

**Author:** ![Erchuang\_Shang](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@Erchuang\_Shang](https://community.criticalmanufacturing.com/u/Erchuang_Shang)\
**Post date:** [September 11, 2026, 7:42am UTC](https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842/3 "2026-09-11T07:42:49Z")

</div>

Hi Johann, thank you very much for you feedback, so your meaning is I need to create a new View to replace the material Defect View? Then I need to copy all of the content from the original Defect View to the new one, then add my function to it, right?

---

<div class="post-metadata">

**Author:** ![Johann\_Knorr](https://yyz2.discourse-cdn.com/flex050/user_avatar/community.criticalmanufacturing.com/johann_knorr/32/1355_2.png) [@Johann\_Knorr](https://community.criticalmanufacturing.com/u/Johann_Knorr)\
**Post date:** [September 11, 2026, 8:32am UTC](https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842/4 "2026-09-11T08:32:55Z")

</div>

That is one option but before that I would look into injecting the button directly into that view, like we do for steps in wizards: [Authentication Portal](https://developer.criticalmanufacturing.com/11.3/explore/guides/customizations/presentation/wizard/)

I can’t guarantee that’ll work. Overriding it however will work for sure so don’t spend too much time testing that.

---

<div class="post-metadata">

**Author:** ![Erchuang\_Shang](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@Erchuang\_Shang](https://community.criticalmanufacturing.com/u/Erchuang_Shang)\
**Post date:** [September 11, 2026, 10:27am UTC](https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842/5 "2026-09-11T10:27:14Z")

</div>

Hi Johann,

Yes, I’m trying extend the original function now, thank you for your suggection.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex050/user_avatar/community.criticalmanufacturing.com/system/32/23_2.png) [@system](https://community.criticalmanufacturing.com/u/system)\
**Post date:** [September 15, 2026, 2:06am UTC](https://community.criticalmanufacturing.com/t/how-to-inject-a-button-in-material-defects-view-action-bar/842/6 "2026-09-15T02:06:37Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
