on ‎2024 Mar 14 3:22 PM
Hi,
I have a container that I want to dynamically add a button to using custom JavaScript when I click a button that already exists in the form.
This is the code I've tried and i know that the Component ID of the container is correct but the button isn't showing up. I'm guessing that maybe I'm not creating the button correctly? Also, I haven't done anything with the inputs or Outputs. Is that something that I would need to do?
const container = document.getElementById("9f1b57c7-72a2-4d17-9c20-91ab6dbecc4c");
const newButton = document.createElement("button");
newButton.textContent = "Click Here";
container.appendChild(newButton);
Thanks in advance!
Cheers,
Ron
Request clarification before answering.
Hi Ron,
why don't you just add the button via the SAP Build tool itself using drag and drop?
Best,
Edrilan Berisha
SAP S/4HANA Cloud Financials Development
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.