Anyone can suggest how to Hide or Un-hide the custom button?
Thanks in advance.
Anyone can suggest how to Hide or Un-hide the custom button?
Thanks in advance.
Set Visible = true / false.
@josecgomez , I am trying to hidden the custom button on the page load but it doesn’t work in kinetic.
Do you have any idea?
Thanks in advance.
FWIW I also tried this yesterday. I iterated with several kinds of events, including simple buttons. I referenced using the button ID, and the GUID (Pulled from dev tools. How else am I supposed to find the GUID for a control?)
That property-set widget either doesn’t do what we think it does, or it needs some other widget after it to update the screen. I would love to hear a solution to this.
Bind the button to transview and use a row rule to hide it?
I’ve never done that! Can you say a bit more about it?
All this to simply hide a button. No wonder everyone’s hating on Kinetic!
I mean, that took me all of 5 minutes.
Less time than writing the code to do the same thing in classic.
You definitely don’t need the GUID, but that’s how I find it too.
You can do it just fine with the button ID.
I don’t really know what your use-case is, but you can do this with a rule too.
Using this event to toggle the TransView.HideButton, but you can base it off of any field.
Bind your button to something.
One rule to toggle them all.
In case I have not beat the out of the Epicor Idea for ARIA-Roles, this is EXACTLY how automated testing and people with screen readers find your UI elements. Guess what? It will help YOU find your UI elements as well! Using a Button ID or GUID can break all testing and screen readers if the ID ever changes - and they do because you don’t always control them.
Vote like your customization depends on it - because it does! And be nice to people with poor vision while you’re at it.
This approach worked for me. Just curious, what is this expression?
{TransView.HideButton} == true ? false : true
I don’t get it. Is the property set widget creating a new “HideButton” property in TransView? Is “HideButton” a built-in something? Why wouldn’t we use the property-set widget to set the visible property of the button? I mean it all sounds pretty straight forward until you posted this.
TransView is a runtime dataview. All I’m doing is creating an on-the-fly variable (HideButton).
That expression is changing the value of HideButton so it acts like a toggle. If it’s true, make it false. If it’s false, make it true. That way, when you click the button to hide the other button, you only have a single button to hide and unhide it, ya know?
In the example I posted your ARE using property-set to set the “Hidden” property of the button. I’m just setting that property to the value of TransView.HideButton to make it dynamic.
Again–without a use case, it’s hard to determine what y’all are trying to do, so I do my best to create an example with working pieces that show how it all happens.
I could have easily done something that sets the property if, say, ABCCode is “A” or whatever. I did the toggle button click, so everyone can see what’s happening in the GIF.
I appreciate you taking the time to explain this.
I’m having a similar issue. I can hook an event to AfterGetBy and use the property-set widget to unhide a component on the 1st Detail page. However I’m not able to do the same on any sub pages when loading that page. I hooked my event to the RowChanged_sysPages event in this case.
The console shows the events are firing but does not update the UI. I’m wondering if this is a bug. I’m running 2022.2.13.
I can interactively unhide with a button, no problem. Using the data rule works upon form load but to hide only. It cannot unhide.
Any thoughts or idea on how I can unhide a hidden component on a sub page based on an event as the page loads?
Find a control that’s specific to that page (IE, OrderRelNumNav in Order Entry) and hook into its OnCreate event, then use property-set to set hidden to false.
It feels dirty, but it works.
I confirmed the other events didn’t work which tells me that the control likely hasn’t been created before those events fire. It needs to exist before its properties can be evaluated or set.
Thanks for the tip. It was a hit or miss with the BOLDtl.BOLLineNav as it must got created before the fields I needed to control. I ended up hooking into another field that worked.