How to add Enum page in Freedom UI pages?

Hi everyone,

in the OLD UI I used to create a separate module that stored all the constant values used in the code of the pages, such as a specific AccountTypeId or a SysAdminUnitId. I also used to add this module in the edit pages to access those values.

Now I need to do the same thing in the Freedom UI and I haven't figured out how to do it yet. I tried using the same approach by adding the Module in the SCHEMA DEPS and ARGS of the page definition, but I can't access the properties of the custom module.

Can anyone help me?
Let me know.

Thanks in advance.

BR,

 

Luca

Like 0

Like

1 comments
Best reply

I did additional tests and found that referencing the module in the SCHEMA DEPS and ARGS is correct, even though while debugging it's not possible to see the page constants "clearly". However, using "await" allows you to access to those values.

For example, like this:

var customerType = await UsrTestConfigurationEnum.AccountTypes.Customer;

I did additional tests and found that referencing the module in the SCHEMA DEPS and ARGS is correct, even though while debugging it's not possible to see the page constants "clearly". However, using "await" allows you to access to those values.

For example, like this:

var customerType = await UsrTestConfigurationEnum.AccountTypes.Customer;
Show all comments