Skip to main content

Hello,

Here is the pattern I want to follow:
I have a custom field of type enum (boolean) in the CustomerInfo entity named “regrouping nrc.”
I have the same custom attribute, with the same name, in the CustomerOrder entity.
What I want is for the value of the custom attribute from CustomerInfo to be selected by default.

The problem is that I can’t set a default value by logic (PL/SQL) for an enum (boolean) type.
It works for strings, but I need to keep the page design with a switch button, so I can’t use a string type.

I could create a custom enum with a default value like null, which would allow me to trigger it by event and fall back on the CustomerInfo attribute. That would work, but we’re afraid that users might ignore this attribute when creating an order, which could lead to errors at the end of the process, especially for customer invoicing.

If you have any ideas on how to implement a fallback default value for a boolean, please share them 🤙

Have a good day,

Be the first to reply!

Reply