Skip to main content

User Defined Codes in Epicor

If you have a list of value for any User defined Field in your customization and the better solution is to add it to the user defined codes and you can add to it at any time without a need to edit your customization as below:
An example:  I have a list of purchase group (410,411,412,413,…..etc) so I will add the user code type which is “Purchase group” and then I will add the codes which is (410,411,412,413,…..etc) as you can see below:



Add the code types (PG)



Then you all add all PGs to the codes as below:


Then you can attach this code type to a user-defined field and there are two ways to do that:

The First Way: Attach this code type as an extended property to a user-defined field. 
Open the extended properties as below:
System Management > Utilities > Extended Properties  
Use the Detail sheet to find and select the table you need.
Navigate through the Tree View to select the field you want to contain the user-defined codes. Be sure to select one of the available user-defined fields, such as Character01, ShortChar01, and so on.
Navigate to the Fields > Detail sheet.
Click on the UD Code Type drop-down list and select the user-defined code type.
Click Save.
Now refresh the application either by changing user accounts or exiting and logging back into the Epicor application. The user-defined codes can now be added to a customization.


Post-requisites
When you create a customization that uses the modified table/user-defined field, you add a control that displays these codes through a drop-down list. To do this, add an EpiCombo control to the form and use the EpiBinding property to link it to the modified user-defined field. When you switch the customization to Run Mode, the codes you created for the code type display on the drop-down list.
You can continue to add codes to the user-defined code type within User Defined Code Maintenance. The code type then updates and displays these new codes on the drop-down list during Run Mode.
Tip: If the codes do not display, verify you have selected the correct user-defined field and have added the EpiCombo as a new control. Also be sure you log out and log in to the Epicor application before you launch the customization in Run Mode. If the codes still do not display, try restarting AppServer and then add the EpiCombo control to your customization.


The second way is very easy:
add an EpiCombo control to the form.
Bind it to your defined field.
From EpiCombo properties you can assign the values to  






Comments

  1. Using v10.
    Thanks for this example, works great!
    but my need is more complex. I want the first combo selection to affect the second combo list.
    I want to use 2 types of codes, typePrim and TypeSecond. both assigned to two EpiCombos.

    I want to set the following behavior, once the typePrim assigned combo is selected, I want the typeSecond combo to show a sublist pertaining to the primary selection.

    In order to acheive that, I used to LongDesc of the typeSecond codes to include the CodeID they are related to in the TypePrimary list.

    I thought of using the SearchFilter to specify a second filter and tried the following:
    CodeTypeID = 'TypeSecond' and LongDesc = 'PrimChoice1' (PrimChoice1 is the CodeID of the first code in the primary list.)
    I also tried
    CodeTypeID = 'TypeSecond' && LongDesc = 'PrimChoice1'

    Both results gave me a black square and no data showing. (2 rows are supposed to show)

    Can this be done ? If so, how?

    I thought of using a BAQ combo listing all the TypeSecond, and I could just filter on LongDesc the list, but I did not see such a property.

    thanks

    Pierre

    ReplyDelete

Post a Comment

Popular posts from this blog

Epicor 9 ToolBars

Like any other application, Epicor has list of toolbars and it uses the Infragistics controls and you can modify these toolbars in your code by adding new tools or change the properties for the existing toolbars and Tools.

How to Use the Business Activity Query Export Process

Business Activity Query Export Process let you export the BAQ data in XML or CSV format. You can export the BAQ data manually and you can schedule it to run automatically (Daily, Weekly, ,Monthly,Once,startup..etc) and you can configure this in the “system agent maintenance” and I will explain this later in this article.