How to define message(e.g. error message)
- 7 years ago
Hi NiNi,
I wasn't aware the UserMessage ItemType existed until I saw this post, so thank you for teaching me something new. :)
I believe the main difference would be that Server-side methods are not able to lookup any error messages in the ui_resources.xml files. If you wanted to store a generic message for C# or VB methods, you would need to store them as UserMessage items in the database, so they could be looked up on the server.
Chris
Christopher Gillis
Aras Labs Software Engineer
- 7 years ago
You are correct that changing the ui_Resources would require clearing the cache or updating the cachingModule. However, I believe in general, it's faster to look up the message from the ui_Resources file than it would be to query the database for the UserMessage item each time.
The resources from the file are cached on the client, so there is only one call to the server to get the message initially. Alternatively, if you were to use the UserMessage item, a separate call to the server would need to be made each time you used it.
Chris