How to Define a Variable as Input Type in Epicor Configurator

I’m working with the Epicor Product Configurator and am facing a challenge with defining variables as the Input type. I need to reference various input objects within my user-defined methods, and I’m looking for the correct way to declare a variable that can hold an Input object.

Here’s the context of my issue:

  • I am not creating new Input objects but need to reference existing ones dynamically within my code.
  • The goal is to manipulate these input objects programmatically based on the business logic.
  • I’m aware of how to manipulate these objects once I have a reference, but I’m unsure of the correct type declaration in C# within the Epicor environment.

I’ve looked through the documentation and forum posts but haven’t found a clear example that shows how to declare a variable of an Input type in the Configurator context. Most examples discuss manipulating existing inputs, not how to type a variable to store references to these inputs.

Does anyone have experience or insights on how to properly declare a variable as an Input type in the Epicor Configurator? Any examples or pointers would be greatly appreciated.

Thank you in advance for your help!

each control has its own type, but I believe they all inherit from Erp.Lib.Configurator.PcControls.EpiPcControl

but in many situations you don’t need to know the type you can just use var

For anyone in the future wondering how I solved this: I set up a case where my Inputs.button was being forced to convert to a string, the compiler then gave an error trying to convert from “InputType” to “string” - from that error message I was able to see the type of Inputs.button

Type was Erp.Shared.Lib.Configurator.InputValueBound

Thank you for the help @Evan_Purdy

MessageBox.Show(((InputControlValueBound<Ice.Lib.Framework.EpiUltraCombo, String>)Inputs["ConfigType"].Value).Value.ToString());

Yes you can access any control by its name, as Inputs is a collection. I’ve only ever done this client side though.

1 Like

I did not realize that Inputs is a collection, this makes everything I was attempting to do much easier! Thank you again Evan