I
I
Ivan Antonov2019-06-10 16:30:29
1C
Ivan Antonov, 2019-06-10 16:30:29

How to add a value to an enum?

Once upon a time, an unfamiliar programmer added a prop to the products ТипТовараand specified a value for it ПеречислениеСсылка.ТипТовара. The enum ТипТовараlists all possible values.
There was a task to add one more type. I go into the enumeration and just add a new value.
But after updating the database, I get an error about an unknown value that I added. Analyzing the code, it turns out that the attribute does not have a new value.
What's happening? Did I forget to update something?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan Antonov, 2019-06-11
@antonowano

Guys, I figured it out. Thanks to all. For each type of product there was a tab in the form of changing the nomenclature. The error was due to the fact that he could not find a tab for the new type that I added. After adding a new tab and copying the necessary fields into it, everything worked.

K
Konstantin Nagibovich, 2019-06-10
@nki

You need to add a new enumeration value in the Configurator mode.

A
Alexey Bespalov, 2019-06-10
@FreeArcher

What is not. There shouldn't be any mistakes. Let's take screenshots where we added the error screen.

D
Dmitry Kinash, 2019-06-10
@Dementor

But after updating the database, I get an error about an unknown value that I added. Analyzing the code, it turns out that the attribute does not have a new value.

It looks like you have a bunch of checks in your document. The entered value in the code is compared for validity with the old values ​​of the enumerations - your new one is not found and cleared. Analyze the code further... But first, you can add a screenshot of the error to the question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question