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) UserMessage Item
    ... UserMessage ItemType exists.
        Not shown in TOC after Aras installation.
2) ui_resources.xml
    ... For example, it exists in "{Aras Installed Dir}\Innovator\Client\Solutions\PLM\xml\".
        Of course, when customizing by myself, I prepare ui_resources.xml in another folder.

I have used both before.
But, I want to know the merits and demerits of each.
Should I separate those depending on situation ?

Parents
  • 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

  • > Server-side methods are not able to lookup any error messages in the ui_resources.xml files.
    it's a important point. thank you.

    In Client-side methods, both ui_resources.xml and UserMessage item can be used.
    If we use them in a client-side methods, are there any advantage and disadvantage for each ?

    One point I consider is that changing the ui_resources.xml required changing the fileRevision attribute value
    of the cachingModule element in web.config, or clearing the client web browser cache. (probably).

  • 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

  • I got it. I understood characteristics of each way.

    Thank you !

Reply Children
No Data