Hi,
I created an Enum with two values: Vendor product (enum value =0) , Customer product (enum value =1)
And now I want to create a third value - Default, and want to make Default's value to 0, it seems I could not really change it. Default value is always set to 2. Is there any way to change it?
Thanks,
Two enum options can't have the same numerical value. So you would need to first change the numerical value of current option 0 to something else.
However please be aware that such change would require you to update all your existing data because the enum values are stored as integer numbers in the database.
However if you change property IsExtensible to Yes, you don't need to worry about numerical values anymore. Then you could try to simply move the enum elements (with Alt-Arrow) to change the default value. If you choose this path, I recommend you first deploy the IsExtensible: Yes change to prod, before starting to change the ordering of the enum values. Just to be on the safe side. At least try to test in your dev/test systems how your historical data behaves after your changes.
Hi Nikolaos,
How to change the enum value, go to the XML file to change it?
You can change it in Visual Studio.
I could not find Enum Value on the Properties from Visual Studio IDE.
Then where are you getting the values that you mentioned in your first message? What do you mean by "Default value is always set to 2"? If you don't see such values in VS, then your enum is already extensible, you don't need to care about numerical values, and you should be able to move any value as the first (default) one.
If you still have questions, could you please share screenshots of your situation to help us understand better.
You are correct. If it is extensible, the values are not shown on VS, but I can move it up using the Alt+Arrow.
Thanks a lot for your help,
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,100
André Arnaud de Cal... 890 Super User 2025 Season 2
Sohaib Cheema 633 User Group Leader