GlideSession - clearClientData(String paramName)

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

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

Table 1. Parameters
Name Type Description
paramName String Name of the client data to clear.
Table 2. Returns
Type Description
void

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

Output:

Harry
 
null