Developer forum

Forum » Development » User property SystemFieldValues is empty

User property SystemFieldValues is empty

Pedro Meias
Pedro Meias
Reply

Hello,

When trying to access property SystemFieldValues of an User, this property is always empty. Is this behaviour expected?

Thank you.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Yes. Why do you access this?

It contains 'custom' system fields - a feature that is deprecated. It will not return the user default fields if that is what you expec?

Under users in control panel where you setup custom user fields, there is also a system field section (if you have the righ permissions) that contains potential system fields. Old feature related to integration I recall.

 
Pedro Meias
Pedro Meias
Reply

Hi Nicolai,

We are customizing the HelloUser item type for one of our customers.

Instead of Rendering the default "Hi" + User.Name, the customer wants to be able to select witch user field should be rendered.

It could be one of User standard fields(Name, email, etc..) or one custom field

We were hoping to find the standard fields in User.SystemFieldValues, the custom fields we know we can find in User.CustomFieldValues

The alternative we found, although not great for performance, is to use reflection to check the user standard fields.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

ok - using User..GetType().GetProperties() is not performance costly at all and we would do the same.

 
Pedro Meias
Pedro Meias
Reply

Hi Nicolai,

Yes - that's what we are doing at the moment.

Thank you for clarifying.

 

You must be logged in to post in the forum