If it’s a finite defined list, like this, I’ll usually create a user code and tie the EpiCombo to the UC BO. You can also use Extended Properties to tie the underlying data field to the UD Codes. Then, when I add a combo, merely binding it to the custom field will default to the correct config.
Otherwise, I’ll use a BAQCombo.
I cannot type values into combobox configured as above. Though, that’s not specifically why I go this route. I, as a rule, try to avoid hardcoding static lists into a form customization.
John thanks for the Friday afternoon reply. I have not made use of user codes yet so i need to do a little research. I think i see where you bind the user code BO.
You don’t need to do any special binding on the field if the field you’re using is an Epicor field. For example, suppose you add a UD field to JobHead called “Results_c”. Here’s what you do:
Create a User Code, example: “JobResults”, and you list the values you want to be valid for those results.
Go to Extended Properties, pull up the JobHead_UD table, go to Results_c field, and add the User Code (JobResults) to this field.
In the form customization, add an EpiCombo, bind it to JobHead.Results_c. You’ll notice a lot of other fields automatically fill in for you - Epicor does the work to have this come from the UserCodes table with the filter for the JobResults code.
Note: changing the extended properties makes a change to the Epicor schema. I usually have to log out of Epicor between steps 2 and 3, give it a few minutes, then log back in.
Hey Kevin thanks for the response. Question Does this work with built in fields of a UD05 Table? I see where you can add the UD Code Type on the fields in UD05_UD but that field is not available in the UD05 table per the image below.
I figured it out thanks. I saw where the Properties of the combo box were changed using the wizard and applied those changes to the other EpiCombo’s I wanted to change.
If you use the EpiCombo control, you can also set its style to DropDownList through custom code, so that it can only be selected through the drop-down list and the user cannot enter anything.
Exp:
add a EpiCombo
Set RetrieveOnActivate to fales
Set Staic data you need
I was doing it that way minus the custom code. I guess the code limits the entries the user can make to the static list. I was able to input anything I wanted in the combo box when I tested it originally.
I will keep it in mind for the next time.
I do like the user code option for the obvious reason, if the list changes you only need to edit in one place.