Open CaptainCannabis opened 1 year ago
@CaptainCannabis @ariclevin I'm also wondering how this would actually work.. Can you please help? :)
This seems to be very poorly documented. I'm also having the same issue, button just appears greyed out, and won't let me do anything even if i assign a OnChange action. Wish PCF Gallery would delist tools that developers arn't responding too.
Running into the exact same thing. how in the world do you trigger that function off of the onchange event??????? @ariclevin
@jimmerjohn123 I ultimate ended up using another PCF control that was easier to use. https://pcf.gallery/button-control/. Your onchange event just needs to include clearing the field out in the code as well for this plugin. His wiki page explains that. https://github.com/BIDSL/PCFControls/wiki/Button-Control
The click event of the button is simply added to the placeholder control of the text field that the button control is displayed on. Below is a sample of the click event that will open a new window when the button is clicked.
This is not clear to me - after adding the button to a form? How to trigger JS code by clicking that button? Dynamics only offers a onChange event for the field which holds the button. That wont fire if button is clicked?
Could you provide an example of how to get the control in window form load and then insert code which is executed on form load?