Notifications
Announcements
No record found.
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.
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?
If user enters an enum value in one dialog form, that enum value should get added to the base enum.
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.
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.
Thank you Nicholas for this work around.
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 Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 646 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader