User notification from server methods

Hi, 

I'm creating server method and populating a new Part structure (+ doing other thing in an method). And last thing from method I would like to send 'on screen ' summary/notification what happened to the user (like inn.newError("Hi, this is what happened")). But as an 'Info' not an _error_.

Is there a nice way to send information from server methods to users?

 //Jukka

Parents
  • Hi Jukka,

    This is generally not possible as server methods are intended to run separate from the client. There are a couple built-in alternatives to get a notification to the user however.

    1. Send an email to the user
    2. Call your server method from a client method
      • This is a good choice if your server method is running from an Action instead of a Server Event
      • You can run your server method by using aras.applyMethod(YOUR_METHOD_NAME, YOUR_METHOD_BODY);
      • Notifications to the user can be thrown using standard browser functions ( alert("This is what happened"); ) or Aras functions ( aras.AlertSuccess("This is what happened"); )
    3. Create a new Notification Message item
      • Notification Messages are typically used to alert users of things like server maintenance, but you may be able to utilize them for your use case as well
      • You can find these items under TOC > Administration > Notification > Notification Message
      • Aras will periodically poll for new notification messages to display to the user
      • This interval for this polling can be configured by changing the value of the MessageCheckInterval variable item

    Chris

    Christopher Gillis

    Aras Labs Software Engineer

Reply
  • Hi Jukka,

    This is generally not possible as server methods are intended to run separate from the client. There are a couple built-in alternatives to get a notification to the user however.

    1. Send an email to the user
    2. Call your server method from a client method
      • This is a good choice if your server method is running from an Action instead of a Server Event
      • You can run your server method by using aras.applyMethod(YOUR_METHOD_NAME, YOUR_METHOD_BODY);
      • Notifications to the user can be thrown using standard browser functions ( alert("This is what happened"); ) or Aras functions ( aras.AlertSuccess("This is what happened"); )
    3. Create a new Notification Message item
      • Notification Messages are typically used to alert users of things like server maintenance, but you may be able to utilize them for your use case as well
      • You can find these items under TOC > Administration > Notification > Notification Message
      • Aras will periodically poll for new notification messages to display to the user
      • This interval for this polling can be configured by changing the value of the MessageCheckInterval variable item

    Chris

    Christopher Gillis

    Aras Labs Software Engineer

Children