GlideSession - getClientData(String paramName)

Gets a session client value previously set with putClientData().

This method is used in a client script to retrieve data values that were set by a server script that used the putClientData() method.

Table 1. Parameters
Name Type Description
paramName String Name of the client data to retrieve.
Table 2. Returns
Type Description
String The client data as a string.

Scoped equivalent

To use the getClientData() method in a scoped application, use the corresponding scoped method: Scoped GlideSession - getClientData(String paramName).

var session = gs.getSession();
session.putClientData('test1', 'Harry');
var clientData = session.getClientData('test1');
gs.info(clientData);

Output:

Harry