Hi General, I want to inject a button in material Defects view action bar as below.
Because all of those Views have the same action bar id. So if I go to other Views, the injection button still existing.
The code is shown below:
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.
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
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
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?
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
I can’t guarantee that’ll work. Overriding it however will work for sure so don’t spend too much time testing that.
Hi Johann,
Yes, I’m trying extend the original function now, thank you for your suggection.