Forum Discussion

NiNi's avatar
NiNi
Ideator III
7 years ago
Solved

How to define message(e.g. error message)

Hi Team, In Aras Method, when displaying error/information/ confirmation message etc. in the message box to the user, the following is considered as the definition place of the message: 1) User...
  • 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

  • christopher_gillis's avatar
    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