How Can I populate an EpiCombo using C# code

I am trying to create a DialogResult and inside i will have an Epicombo box that shows the level of complexities. I can do this in the SalesOrderEntryForm just by setting my properties correctly without problem

But I cannot figured out why when I do this via c# code I cannot see any data. I know I can just assign my data source but I would like to know how epicombo boxes work. Must probably it has to do with my control not been attached to the customization itself?

Notice that I also try a BPMForm but it doesn’t work in our case.

Private Function  SDUpdateHeaderReason() as EpiForm
....
        SDComplexityCbo.Location = New System.Drawing.Point(74, 6)
        SDComplexityCbo.Name = "SDComplexityCbo"
        SDComplexityCbo.Size = New System.Drawing.Size(114, 21)
        SDComplexityCbo.TabIndex = 4
		SDComplexityCbo.DisplayMember = "CodeDesc"
		SDComplexityCbo.EpiBOName = "Ice:BO:UserCodes"
		SDComplexityCbo.EpiColumns = new string() {"CodeDesc"}
		SDComplexityCbo.EpiDataSetMode = Ice.Lib.Searches.DataSetMode.RowsDataSet
		SDComplexityCbo.EpiSort = "CodeID"
		SDComplexityCbo.SearchFilter = "CodeTypeID = 'SDRevCompl'"
		SDComplexityCbo.EpiTableName = "UDCodes"
		SDComplexityCbo.ValueMember = "CodeID"
		SDComplexityCbo.EpiAltSearchMethod = ""
		SDComplexityCbo.AutoWidthOption = Ctype(1,Ice.Lib.Framework.AutoWidthOptions)
		SDComplexityCbo.RetrieveOnActivate=true
		SDComplexityCbo.EpiGuid = "cc2bab0b-7471-47b1-81e3-b5195b35b2b5"
		SDComplexityCbo.EpiBinding = "OrderHed.RevisionComplexity_c"
		SDComplexityCbo.UseAppStyling = true
                popUpForm = new EpiForm()
                popUpForm.Controls.Add(SDComplexityCbo)
		return popUpForm
	End Function

you need an oTrans (Transaction object) to be able to use EpiCombo properly.
What is the end goal? You said BPMForm wouldn’t why (why?)
The only way to make this work is for you to implement your dialog inside of an existing form with oTrans on it or Implement EpiBaseForm along with Otrans in your internal dialog.

For me whenever I need to create an extra form needing user entry / choices… I create the form into VS, and copy paste the whole class into my Epicor form and the end of the script class.
then all I need to do is call an instance of that new form…passing in parameters etc…and reading back when closing public variables…

Advantage: easier to design/test under VS… !

Pierre

1 Like

Epicor told us that BPMForms wont work when they are called inside another methods. In my case i am in SalesOrderEntry and i tried to use the preprocess directive of the Update method. I tried to use the base salesorder form but couldn’t make it to work. Also we have a lot of directives in SalesOrder BO so that’s why i decided to create my own form .

@josecgomez I will try to use the same epicor transaction from the sales order.

My objective is to pop up a message to prompt the user to add a reason of why we need to do a technical drawing revision . This will help us to track the source of our revision and in the future try to tackle those problems.

@Hogardy Yes thats what i did when i first design it but now the problem is trying to display the values for comboxes without using the custom engine.

In the worst case scenario ,I will just call a method to populate my datasource.

Thanks a lot,

You should be able to use a BPMForm… we use them all over the place and we have plenty of directives… also you can use UBAQ BPM Form

Hi guys I found the property :smiley: you have to set up the transaction at the very end after you set the epibiding and BO

so at the end of all my properties i have this

Me.SDComplexityCbo.EpiTransaction = Me.trans

Thanks a lot jose :smiley: