I had a requirement in which I have to add the enum values to the enum in the run time.
For that I have to add the enum values to the xml.
Can any suggest how to add the enum values to the xml.
I had a requirement in which I have to add the enum values to the enum in the run time.
For that I have to add the enum values to the xml.
Can any suggest how to add the enum values to the xml.
Thank you Nicholas for this work around.
Your understanding of how enum works/ enum is wrong. Enum type fields are used when you have a fixed set of values. In your case user is going to enter a value and that value can differ every time they enter, so better you create a set up form as Nikolaos mentioned and use it.
That's not possible. Base enums are fixed lists. If you need a dynamic list for selection / lookup, you need to create a table where your user can define these values. Then create table relation to this table, from all tables where you want to use this lookup.
The standard system is full of examples, you can check them. For example Payment terms, Customer groups.
If user enters an enum value in one dialog form, that enum value should get added to the base enum.
You can't change the AOT objects (code, metadata) in runtime.
The source code (xml) only exists in a dev system. Then you build a binary (.dll) out of it, and this binary is used in runtime.
In test/prod systems only the binaries are present. Not source code.
However you can have lookups in your form, that you construct in runtime. So perhaps that would solve your business requirement.
What is your business requirement?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156