Forum Discussion
christopher_gillis
7 years agoNew Member
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.
- Send an email to the user
- Sample code for this can be found in the Programmer's Guide
- 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"); )
- 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
jukkatlehtinen
7 years agoIdeator I
Hi, not 100% what I was looking for - but thanks, this made it clear. And I think I will go for a email option.
//Jukka.
- Meismart7 years agoIdeator I
You could try this.getInnovator().newResult();
It won't Alert the user but rather return a status to the caller. you can see this by running an action with the target set to Window.