GlideSession - putClientData(String paramName, String paramValue)

Sets a session client value that can be retrieved with getClientData(). This method is used in a server side script that runs when a form is created.

Table 1. Parameters
Name Type Description
paramName String Name of the client parameter to set.
paramValue String Parameter value.
Table 2. Returns
Type Description
void

Scoped equivalent

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

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

Output:

Harry