GetProjectionByCriteria returns empty name of enum
Best Answers
-
Nicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭Hi Konstantin,
I have not run into that issue myself. Here is what my API call returns for a custom enum:
Looking at that in PowerShell:
We can see that the API is returning the "DisplayName" property, but calls in "Name." The first thing to do here is to check what PowerShell returns for your enum. If DisplayName is blank via PowerShell, that would cause the API to behave similarly.
Another thing to note is that the "DisplayName" property (and in-turn, "Name" from the API call) is localized. There should be a section in the Management Pack that stores the Enum that defines the translations for various languages. If you had this Enum "DisplayName" defined in one language, but are using a different language in the Portal, that could cause the property to return as empty.
Thanks,
Nick5 -
Konstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭Hi Nicholas,Thank for your detailed reply. I actually found the issue to be much simpler (read: do'h): I needed to recycle the app pool and restart the website, before it became aware of the DisplayName for the new enum.0
Answers
I have not run into that issue myself. Here is what my API call returns for a custom enum:
Looking at that in PowerShell:
We can see that the API is returning the "DisplayName" property, but calls in "Name." The first thing to do here is to check what PowerShell returns for your enum. If DisplayName is blank via PowerShell, that would cause the API to behave similarly.
Another thing to note is that the "DisplayName" property (and in-turn, "Name" from the API call) is localized. There should be a section in the Management Pack that stores the Enum that defines the translations for various languages. If you had this Enum "DisplayName" defined in one language, but are using a different language in the Portal, that could cause the property to return as empty.
Thanks,
Nick