Este é o site histórico da documentação 4D. As documentações estão sendo movidas progressivamente para developer.4d.com

Página Inicial

 
4D v19.8
SEND MESSAGE TO REMOTE USER

SEND MESSAGE TO REMOTE USER 


 

SEND MESSAGE TO REMOTE USER ( message {; userSession} ) 
Parâmetro Tipo   Descrição
message  Texto in Text sent to user
userSession  Texto in User's session ID

The SEND MESSAGE TO REMOTE USER command sends a message to all remote users or to a specific remote user.

In message, pass the text of the message to be displayed. It will be displayed as an alert or a notification on the screen of the session user(s).

The optional userSession parameter can be used to designate a specific user by passing their session ID. You can retrieve the session ID with the Get process activity command. If userSession is omitted, the message is sent to all users.

Note: This command can only be executed on 4D Server. If the method calling the command is executed locally on a remote client or on 4D single user, SEND MESSAGE TO REMOTE USER does nothing.

Exemplo  

You want to send a message to all users, then send a message to a specific user:

  // Method to be executed on server
 C_TEXT($message)
 C_OBJECT($element)
 C_COLLECTION($userCol)
 
  // retrieve session information
 $userCol:=(Get process activity(Sessions only)).sessions
 
  // send message to all users
 $message:="A maintenance operation is scheduled for 10pm. The server will be restarted. Please log out before 10pm."
 SEND MESSAGE TO REMOTE USER($message)
 
  // send message to a single user, "Vanessa"
 $message:="Hello Vanessa"
 $userCol:=Get process activity(Sessions only).sessions.query("systemUserName = :1";"Vanessa")
 For each($element;$userCol)
    SEND MESSAGE TO REMOTE USER($message;$element.ID)
 End for each



Ver também 

DROP REMOTE USER

 
PROPRIEDADES 

Produto: 4D
Tema: Ambiente 4D
Número 1632

This command can be run in preemptive processes

 
CONTEÚDO DA PÁGINA 
 
HISTÓRIA 

Criado por: 4D v17 R4

 
ARTICLE USAGE

Manual de linguagem 4D ( 4D v19)
Manual de linguagem 4D ( 4D v19.1)
Manual de linguagem 4D ( 4D v19.4)
Manual de linguagem 4D ( 4D v19.5)
Manual de linguagem 4D ( 4D v19.6)
Manual de linguagem 4D ( 4D v19.7)
Manual de linguagem 4D ( 4D v19.8)