Best place to put global variable (UDField)

Hi Everyone,

I’m new to Epicor so sorry in advance if I don’t make any sense. I am still in the process of learning the software and the learning curve is a good one. I wanted to know where would be the best place for me to store a Global Variable. I want to assign UPC code has the new part is created and needs to store the last one used somewhere. I know that I could simply select the last one used directly from the part table but is there anywhere else I can store some global variable.

I will also need to store some api key for various integration and I will probably have to use a global variable as well.

Thanks in advance for your help!


You could use a User Defined field on a table.

Thanks for your answer @utaylor Is there any table that are recommended to be use in such case ? (API key, Global Variable ect ect)

I’m under the impression that if I create a UDField in a table, all rows are going to get that new column added.

Yeah that is right it is going to add the column to the table and then each row has a value for that column.

If your field is company specific and applies to all parts I suppose you could create a UD field on the Company table. I think it is up to you at this point.

The User Codes would work perfect.

First define a Code Type (think of this as a table name). Then add the code and it’s value (description). You can’t change the Code after it is created. But you could change the value.

And no need to Regen the data model

1 Like

That is another place to do it! I forgot about those!

Some caveats on using User Codes…

  1. You’d be storing your “value” in the description field, which is of type string. So nothing to validate the value against a certain data type
  2. I’m not sure how easily it is to update the “value”

Here’s some I made for a Code Type “GLOBAL_VAR”


That’s exactly what I needed. This make sense ! Thanks for your answer.