I've approached this many ways, frustrating that I have spent so long trying to get this working, seems like it should be easy.
I want a button on a form that when I click it it changes the value of a field.
I have tried the pcf control, wont do anything. Not sure if it is broke or what.
I have created a simple html button that onclick launches a javascript function, which I've added to the form library as a jscript resoruce. But it does nothing.
Is there any place else I need to add soemthing?
I am seeing an error in debugger that the function name is not defined. But I don't see what else I can do to 'define' this? If I have the js in library, and the html button onclick calls that function name, what do I do to 'define' it?
Thanks,
Terry
Please post the code you've written for the button (both the HTML and the JS).
Where is your javascript code written? is it written as a script inside the HTML file?
yes/no doesn't work in my situation where I have the button adding text and appending to another field multiple times...
Finally after trying too many times, I ended up using Ribbon work bench instead and put the button in the ribbon and attached code that way... which worked in classic, but not unified... so then had to spend hours searching around to figure out how to get working in both.. which I did, but man shouldn't have had to spend my entire Saturday getting a simple button working.
Microsoft really needs to make these things easier. Adding a button on the form?!, that onClick does something? I mean come on.. that is like pretty basic for any toolset going back 30 years. Seems weird that you have to do all sorts of work arounds and other 3rd party tools and code and then configuration work arounds (primaryControl vs executioncontrol), etc. ridiculous.
Thanks,
Terry
Hi,
If it doesn't matterhow the button is put on the form, I suggest you simply put a Two Option (Yes/No) field on the form and write Business Rule to do your task.
This should run when you set the field to Yes.
The first step in the Business Rule is to check if the button value is Yes.
And the last step in the Business Rule should set the value back to No (this won't trigger the logic again since you are checking for True value in the first step mentioned above and this will also make the field available for Next use).
Hope this somewhat helps.
Siv Sagar
149
Super User 2025 Season 1
Muhammad Shahzad Sh...
61
Most Valuable Professional
Daivat Vartak (v-9d...
53
Super User 2025 Season 1