I'm trying to add a button to a customization screen in Acumatica that will run a small JavaScript function when clicked.
I am able to type the function inside a JavaScript control, which will be called from the button's Click or MouseDown events. I can also directly type the function into any of these 2 button events, without the need of the JavaScript control.
Using a basic alert("test");
for testing, I can confirm the code runs, with any of the 2 methods I described above.
The problem:
Clicking on the button doesn't run the code. Instead, the message pops up right after the screen loads, and it actually does it 2 times, so it seems the function runs automatically twice on screen load.
- Is this possibly a bug? or am I doing something wrong?
- Is there a "correct" way or a specific set of steps to follow in order to include JavaScript code into a Customization Screen?
Notes:
- Currently testing on Acumatica 2022 R1.
- I have tested this prior to and after publishing the screen, getting the same results.
Comments
Post a Comment