Page 1 of 1

Controller Parameters Change After Saving and event doesn't fire

Posted: March 4th, 2022, 10:08 am
by Toyeyemi
I'm having an issue with one of my controllers where when placing the controller into the canvas, the parameters change and the event refuses to fire.
Here is an image of the method and it's parameters
Model Layout.png
Model Layout.png (224.58 KiB) Viewed 655 times
Model Layout.png
Model Layout.png (224.58 KiB) Viewed 655 times
It contains an array Orders of the parameters (OrderNumber, LineNumber, SecondIN, Checked, OrderCompany and Description).
When initially trying to assign fields to these parameters in my event, I believe that everything looks correct
Original.png
Original.png (266.77 KiB) Viewed 655 times
Original.png
Original.png (266.77 KiB) Viewed 655 times
However after the fields have been filled out and I hit save, the Array Name changes to ",Orders" and all of the parameters have been changed to "Orders"
changed.png
changed.png (266.73 KiB) Viewed 655 times
changed.png
changed.png (266.73 KiB) Viewed 655 times
On trying to fire the event on the page, I get no response

Re: Controller Parameters Change After Saving and event doesn't fire

Posted: March 4th, 2022, 10:20 am
by SteveCap
Resaving events is a known issue. We have task #9899 for this. This post will be updated when the task is completed.

Re: Controller Parameters Change After Saving and event doesn't fire

Posted: March 4th, 2022, 11:42 am
by Toyeyemi
Hi Steve, can I ask if there's a workaround for this, what do I need to delete/remake?

Re: Controller Parameters Change After Saving and event doesn't fire

Posted: March 4th, 2022, 11:53 am
by SteveCap
Yes for now you will need to delete and remake

Re: Controller Parameters Change After Saving and event doesn't fire

Posted: March 4th, 2022, 4:33 pm
by Toyeyemi
Hi Steve, Thank you for your responses in this thread, while remaking my controller, I believe that I have found the reason why the event wouldn't fire in the first place.
2022-03-04 16_18_33-Parameters.png
2022-03-04 16_18_33-Parameters.png (50.1 KiB) Viewed 642 times
2022-03-04 16_18_33-Parameters.png
2022-03-04 16_18_33-Parameters.png (50.1 KiB) Viewed 642 times
In my controllers parameters I had included two specific fields: SDDCTO and SDKCOO. When I first brought up this issue, I had both of these fields set to visibility:false as they are pieces of information that I want to collect, but I do not want the end user to see.
2022-03-04 16_22_56-VisibilitySetting.png
2022-03-04 16_22_56-VisibilitySetting.png (47.33 KiB) Viewed 642 times
2022-03-04 16_22_56-VisibilitySetting.png
2022-03-04 16_22_56-VisibilitySetting.png (47.33 KiB) Viewed 642 times
Unfortunately, when either of these fields is invisible, my SendCancellation event would refuse to fire.
2022-03-04 16_27_53-BackOrderSummary (VIEW-11000000) _ App for training purposes-event_didn't_fire.png
2022-03-04 16_27_53-BackOrderSummary (VIEW-11000000) _ App for training purposes-event_didn't_fire.png (50.21 KiB) Viewed 642 times
2022-03-04 16_27_53-BackOrderSummary (VIEW-11000000) _ App for training purposes-event_didn't_fire.png
2022-03-04 16_27_53-BackOrderSummary (VIEW-11000000) _ App for training purposes-event_didn't_fire.png (50.21 KiB) Viewed 642 times
Only when both fields were completely visible was I able to get the expected response.
2022-03-04 16_30_39-BackOrderSummary (VIEW-11000000) _ App for training purposes_fired.png
2022-03-04 16_30_39-BackOrderSummary (VIEW-11000000) _ App for training purposes_fired.png (49.46 KiB) Viewed 642 times
2022-03-04 16_30_39-BackOrderSummary (VIEW-11000000) _ App for training purposes_fired.png
2022-03-04 16_30_39-BackOrderSummary (VIEW-11000000) _ App for training purposes_fired.png (49.46 KiB) Viewed 642 times
Is there a workaround present that would allow me to hide those fields while still being able to use my controller?

Re: Controller Parameters Change After Saving and event doesn't fire

Posted: March 4th, 2022, 4:41 pm
by SteveCap
You are looking for the property RenderIfNotVisible. If you set that to true the field will still be added to the page but it will have display:none;

Re: Controller Parameters Change After Saving and event doesn't fire

Posted: September 16th, 2022, 4:00 pm
by JustinVanRegenmorter
ControllerParameters have been fixed in an earlier revision.