Disable standard Epicor button

I am trying to disable the Transfer button on Inventory Transfer when a custom field is checked. I struggled mightily trying to get the control bound to something in the EDV that was useful… but the particular field in my database is not included in this form and it would not let me key on the correct field to set up a FKV and get it. So, I used a BPM to set the callContextBpmData.Checkbox01. OK. So now I am trying to disable the button when this is true. I setup a row rule and tried to pick the button (which is EpiBound as view.btnTransfer) but I get an error about the row being negative or 0 when I try to set it to ReadOnly. That EDV clearly has a row selected though. Is there a trick to disabling this button? I’ve got enough time into it … now it’s time to ask for help.

Grab the reference of the control and do:

EpiButton yourButtonVariable = (EpiButton)csm.GetNativeControlReference("ButtonGuid");
yourButtonVariable.IsEpiReadOnly = true; //or false

That is the exact solution. THANK YOU!! I skimmed through the properties I had available and I saw that but I thought it would tell me if it was read only… I didn’t realize I could set it also. What do ReadOnly and Enabled do then?

Read only shows the button as dark gray, but I believe is still clickable in animation, but has no effect.
Disabled makes it a light gray and unclickable.