How can I set a Context Menu for epiTextBox that isn't bound?

I have an epiTextBox control on the A/R Invoice Tracker screen which I’m filling with a value that comes from a DynamicQuery. It is being populated correctly. I want to be able to right click on that and Open With. I set the EpiContextMenuKey to UD21.Key1 and UD21.Key1 is defined in Context Menu Maintenance. But whenever I right click is pops up an error.


How can I get this to work? The Customization Guide implies that EpiContextMenuKey should be enough, but it obviously isn’t.

Does your UD21 only use the one key? If it uses more than one, it wouldn’t know which record to open.

I’m running a Dynamic Query, which runs a BAQ to find out which UD21 record that Invoice Number is part of. It passes the invoice number and returns one UD21_Key. I take that key and set the epiTextBox.Value to it. It displays the correct value, I just can’t right click and open up the maintenance screen from it.

I’m not sure if there is a way to do it on an unbound control. But you could always just bind it to a UD field (or if the main table has UserChar1 field, then no need to Regen Data model)

Edit

Even after binding a txtbox to UserChar4, and setting the epiContextMenu property, I still needed to go into Extended Properties and set the Like and Like field for UserChar4 on my table.

image

Edit #2

With the extended Property’s Like values set, you don’t need to set the epiContextMenu property on the form’s control.