Base TextBoxes unavailable?

Is there a reason that Base TextBoxes are not available in a customization, even to get a value from ?

When I try something like

String strKeyField = txtKeyField.Text;

with txtKeyField being a Base TextBox, I get the following error when attempting to compile

Error: CS0103 - line 58 (224) - The name ‘txtKeyField’ does not exist in the current context

Are these locked up intentionally, or is this a scope issue ? I’ve no problem accessing TextBoxes I add in the customization, only the Base TextBoxes.

I’ve also tried accessing the underlying EmbeddableTextBox linked to the visible TextBox, with the same result

String strKeyField = txtKeyField_EmbeddableTextBox.Text;

Error: CS0103 - line 58 (224) - The name ‘txtKeyField_EmbeddableTextBox’ does not exist in the current context

You have to address them by their GUID look at page 493 of the Customization User Guide.
https://epicweb.epicor.com/doc/Docs/EpicorCustomization_UserGuide_101600.pdf

2 Likes

You need to first retrieve a reference to the base control. You find the GUID of the control in the properties and retrieve it like this.

EpiUltraCombo eucSales=(EpiUltraCombo)csm.GetNativeControl("CONTROL GUID");
1 Like