MscrmTools / PCF-Controls

Controls using PowerApps Components Framework
GNU General Public License v3.0
83 stars 42 forks source link

Action Button only trigger once #167

Closed puneet16 closed 6 months ago

puneet16 commented 6 months ago

I added action contriol on my custom text field. It only triggered when I clicked first time but after that the onchange event is not firing. Could be please help me to find the problem?

I want to trigger onchange function whenever user click on the button.

gavinpollockacora commented 6 months ago

Hi, check the example on the home page. You need to clear the value every time in the onchange function otherwise the text value is not 'changing' so it won't trigger. Add this into your onchange event:

let attribute = executionContext.getEventSource();

attribute.setValue(null);
attribute.setSubmitMode("never");
MscrmTools commented 6 months ago

Thanks for helping @gavinpollockacora