UD Table and Dropdown Menu

I have a UD table we are keeping track of some data. As we all can suspect, and I warned about, the end users have been fudging things and it is making things very difficult. So we want to use a set of options in a dropdown menu. I only need the one selected saved to the UD table.

What is the best way to hold the data for the dropdown menu?

One of the menu options are the departments, the other two, or more, are codes that are unique to our company.

Use the appropriate combobox (data linked or static ) with this attribute set in code:

cboYourComboBox.DropDownStyle = Infragistics.Win.UltraWinGrid.UltraComboStyle.DropDownList;

As for the data, use User Codes, or another UD table.

I’m thinking user codes. Never used those, but don’t want to use another ud table. Can you point me to the info on User Codes? Like to learn how they work.

I got all of my info from this forum and this website:

BINDING AN EPICOR ERP COMBO BOX AVAILABLE VALUES TO USER CODES

1 Like

Lastly, where do I put the code in at? Meaning, do I sue one of the wizards to do it, or do I just drop it into the Script editor? Or…Is there another place it goes I am missing? Sorry for all the questions, never been down this road before.

I’ve been there, and if I had more time, I’d baby step you.

For now you’ll have to search around or maybe someone else will chime in.

Good luck though!

1 Like

Completely understand! Its the little things like this I’d wish there were videos on. I’d watch, try, and learn everyday if that were the case! I think I figured it out though. Just have an error (Invalid column name ‘CodeID’.) I am working through right now. But the code did compile successfully!! Thank you!

Where are you doing this @Will79 ? Is this is a UD dashboard? Or are you using the UDxx screen that you put on the menu?

I am doing this with a UD Form. I went to Menu Maintenance, and setup for UD24 and am customizing that.

You shouldn’t have to write any code. Just put a dropdown on the screen, then bind it to the field you want. Then you set the BO that the drop down to UDCodes and set the filter. Let me scrounge up and example so I can send you a screen shot.

Edit: actually the link that @klincecum walks you right through it. That would be what I’m talking about.

I had that done, but previously he said something about the code. So, I put that in. I will try it without it.

CodeTypeID is what you want in your filter.

1 Like

THANK YOU! That is what I was missing! Thank you!

1 Like

The code I provided keeps them from typing in their own data in that field.
They can ONLY select from the drop down.

Without it, you can type it in.

2 Likes

Would this work for a retriever combo? I am currently trying but getting compile errors, so figured I’d ask.

show your errors

I first used the below code, and it didn’t stop me from typing my own thing in:

resourceGroupComboC1.DropDownStyle = Infragistics.Win.UltraWinGrid.UltraComboStyle.DropDownList;

Next I figured, its not a ComboStyle but an RetrieverComboStyle. Well, the error is:

Compiling Custom Code …

----------errors and warnings------------

Error: CS0234 - line 53 (369) - The type or namespace name ‘RetrieverComboStyle’ does not exist in the namespace ‘Infragistics.Win.UltraWinGrid’ (are you missing an assembly reference?)

Looked into infragistics, and didn’t see anything so figured I was wrong and its jsut UltraComboStyle, but I’m back to the original issue.

here is a dirty trick

comment out that code and add in

bool whatamI = resourceGroupComboC1.DropDownStyle;

and the type will be listed in the error message.

NICE! I did that and this ws the error message. Based on this, it is an UltraComboStyle, correct?

Cannot implicitly convert type ‘Infragistics.Win.UltraWinGrid.UltraComboStyle’ to ‘bool’